Query for post and costom post_type in same category filtered by meta for post_type

Solved. I needed to change meta_query this way: $meta_query = array( ‘relation’ => ‘OR’, array( ‘key’ => ‘public’, ‘value’ => ‘1’, ), array( ‘key’ => ‘public’, ‘value’ => ”, // necessary to work!!! ‘compare’ => ‘NOT EXISTS’ ), ); 1st array search for post with meta key ‘public’ set to 1 2nd array add post … Read more

Custom Post 404

Ok all, I think I figured out the problem…well, problemS. First, credit to @WebElaine, for putting me on the right track with the unregister_post_type() function. I unregistered ALL of my post types, then went through and made sure everything was singular with no trailing S. After unregistering everything (and commenting out any code that would … Read more

How to create custom search result page with custom URL parameters for custom post type?

Add this code in functions.php function custom_rewrite_rule() { //Initializing Rewrite Tags add_rewrite_tag(‘%begin-date%’, ‘([^&]+)’); add_rewrite_tag(‘%end-date%’, ‘([^&]+)’); add_rewrite_tag(‘%offset%’, ‘([^&]+)’); //Find page rewrite rules add_rewrite_rule(‘^find/([^/]*)/([^/]*)/([^/]*)/?’,’index.php?page_id=<SEARCH_PAGE_ID>&begin-date=$matches[1]&end-date=$matches[2]&offset=$matches[3]’,’top’); add_rewrite_rule(‘^find/([^/]*)/([^/]*)/?’,’index.php?page_id=<SEARCH_PAGE_ID>&begin-date=$matches[1]&end-date=$matches[2]’,’top’); flush_rewrite_rules(); } add_action(‘init’, ‘custom_rewrite_rule’, 10, 0); On your custom search page template $begin_date = get_query_var(‘begin-date’); $end_date = get_query_var(‘end-date’); $offset = get_query_var(‘offset’) ? get_query_var(‘offset’) : 1; Create a page having slug find and … Read more