Show posts from two specific category in WP_Query

So you want to show only posts that have both employee and full-time categories. If that is the case than you can do the following. Because you haven’t posted the full query args I will only show the tax_query part ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => … Read more

How to create additional rendering for custom post types?

You need to use add_rewrite_tag and add_rewrite_rule functions to first register your custom URL handlers. Something like add_rewrite_tag( ‘%custom_render%’, ‘true’ ); add_rewrite_rule( ‘([^/]+)/custom_render/?$’, ‘index.php?name=$matches[1]&custom_render=true’, ‘top’ ); And then you can us template_inclide hook to check if the query param custom_render is set, then return the name of the new template. Note: You need to flush … Read more