Unable to insert current username into custom table through html form

wp_get_current_user returns a WP_User object. You’ll need to pull the name out of that in order to send it try $current_user->display_name in your insert statement. On that note, you should absolutely not be inserting unsanitized user entered data into your database. Please look into SQL injection and input sanitization.

Images with overlay

I was able to find some jQuery that helped solve the issue: $( “.alignright” ).parent().addClass( “alignright” ); $( “.alignleft” ).parent().addClass( “alignleft” ); $( “.aligncenter” ).parent().addClass( “aligncenter” ); This small piece of code finds alignright, alignleft, and aligncenter then adds those classes to the “parent” container, which is the containing element that those classes are applied … Read more

sessionStorage saves input value in browser but it is not loaded in the form field

You are using innerHTML for every field. Input field shouldn’t be using .innerHTML use .value instead and for select you should loop through the options not use .innerHTML window.onload = function() { var quote_price_input = sessionStorage.getItem(“quote_price_input”); var message_to_customer = sessionStorage.getItem(“message_to_customer”); var select_price_option = sessionStorage.getItem(“select_price_option”); if(quote_price_input !== null) { document.getElementById(‘quote_price_input’).value = quote_price_input; } else document.getElementById(‘quote_price_input’).value = … Read more

How do I show the HTML descrption in wordpress photo gallery for my individual gallery pages?

With some CSS/HTML I managed to solve my issue. But, I had to enable Gallery title right above the description setting checkbox in my screenshot. HTML <a href=”http://wordpress.stackexchange.com/bwg_gallery/<slug-url-here>/#top” name=”top”></a> <h4>Title</h4> Addtional CSS ( to hide the title since I already have a title above this one ) .bwg_gal_title_0:not(.bwg_gal_description_0){ display: none !important; }

Display child-page links in sidebar on both Parent Pages AND Child Pages

The following fixed the issue for me: <?php switch ($isBlogsPostPage){ case true: $parentID=get_correct_id($post, $isBlogsPostPage); break; default: $parentID=get_correct_id($post); } $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => 10, ‘post_parent’ => $parentID, ‘orderby’ => ‘menu_order’ ); $parent = new WP_Query( $args ); if ( true ) : ?> <section class=”links border shadow”> <ul> <?php while ( $parent->have_posts() … Read more