WordPress private post won’t display to other admins

The solution I found is in the pre_get_posts function: I added: if ( is_user_logged_in() ) { $query->set( ‘post_status’, array(‘private’, ‘publish’)); } Full code for function: /*——- START add webinars custom post type to the main query loop———-*/ add_filter(‘pre_get_posts’, ‘query_post_type’); function query_post_type($query) { if( is_category() ) { $post_type = get_query_var(‘post_type’); // show private posts to admins … Read more

Add dynamic search to paginated WP_Query

since in the comments you explained by dynamically you mean without reloading/refreshing the page. the answer to the first question is: yes, you will use AJAX calls. first, create the search input <input name=”input_name” placeholder=”<?php echo __(‘search’,’textdomain’); ?>”> second, the Javascript registered and enqueued script in functions.php (function ($) { $(document).ready(function () { $(“[name=input_name]”).keyup(function () … Read more