Replace header with large image on home page only, using Genesis child theme

Well I got it working with a different approach but a good answer that provides insight why the approach in my question didn’t work will be accepted as the answer. I put this in functions.php for the child theme: add_action( ‘genesis_before_header’, ‘bob_gray_image’, 10 ); function bob_gray_image() { if ( is_front_page() ) { echo(‘<div class=”bobgrayimage”><img src=”https://wordpress.stackexchange.com/images/robert-c-gray-banner-maskbob-sharpen.jpg”></div>’); … Read more

How to change the value of a variable using input field?

Please try below snippet of code. HTML : <input name=”getUser” id=”getUser” value=””/> <div id=”user_data”></div> JS (js/my-ajax-script.js) jQuery(document).ready(function($){ $(‘#getUser’).keyup(function(e) { var user_id = e.target.value; console.log(user_id); $.ajax({ url:my_ajax_object.ajaxurl, #add here your ajax url type:’POST’, data:’action=get_this_user_data&user_id=’+user_id , success:function(results) { jQuery(‘#user_data’).html(results); } }); }); }); Ajax (add in functions.php) function my_enqueue() { wp_enqueue_script( ‘ajax-script’, get_template_directory_uri() . ‘/js/my-ajax-script.js’, array(‘jquery’) ); … Read more

Use Post ID in functions.php

Only posting an alternative answer despite the question being about a 3rd-party plugin, whose source code isn’t even freely available, because I don’t believe the accepted answer is likely to be a good solution. It’s not documented on their website, but a comment from the developer states: These would all be considered custom requests, which … Read more

Filter by Post Type

You can use WP_Query for that : $contentTypes = explode(‘,’, $_POST[‘contents’]); $qry = new WP_Query( array( ‘post_type’ => $contentTypes )); if( $qry->have_posts() ){ while( $qry->have_posts() ) { $qry->the_post() // Your code } } Here is the [docs] ( https://codex.wordpress.org/Class_Reference/WP_Query ) for WP_Query