How to search through all child taxonomies using WP_Query?

Finally figured out the solution. Answering it if anyone finds it useful. Where $_GET[‘s_qr’] has a search query from a user from another page. $i = 0; $parent_name=””; $taxonomyName = “product-cat”; $search_r = array(); $parent_terms = get_terms( $taxonomyName, array( ‘parent’ => 0, ‘orderby’ => ‘slug’, ‘hide_empty’ => false ) ); foreach ( $parent_terms as $pterm … Read more

Permalink for specific post type

If it is an option to use a plugin, here is one with over 100,000 installs, so it seems to do a good job: https://wordpress.org/plugins/custom-post-type-permalinks/ It is exactly solving your client’s wish. After installing and activating it, go to Settings -> Permalinks -> and scroll down to the section Permalink Settings for Custom Post Types.

How can I query and sort custom-post type using WP_Query

You should add arguments to WP_Query to sort by your keys in the order you want. The compare value can be your filter (larger, smaller, etc) $args = [ ‘meta_query’ => array( ‘relation’ => ‘AND’, ‘event_start_date_clause’ => array( ‘key’ => ‘_game_date_key’, ‘compare’ => ‘EXISTS’, ), ‘event_start_time_clause’ => array( ‘key’ => ‘_game_home_goals_key’, ‘compare’ => ‘EXISTS’, ), … Read more