How to show to show post list under the specific category name using jetengine query?
How to show to show post list under the specific category name using jetengine query?
How to show to show post list under the specific category name using jetengine query?
I’d do it something like this. First, register a new query var, so WP will acknowledge its existence: add_filter( ‘query_vars’, function( $query_vars ) { $query_vars[] = ‘cast’; return $query_vars; }); Next, add a rewrite rule, which converts the pretty permalink version of your URL behind the scenes: add_action( ‘init’, function() { add_rewrite_rule( ‘^movie/([^/]+)/cast/?$’, ‘index.php?movie=$matches[1]&cast=1’, ‘top’ … Read more
Save selected terms in order of custom taxonomy in post
Did you try explicitly setting the term array? And set append to true? $terms = array( 35, 36 ); wp_set_post_terms( $this->postId, $terms, “my_tax”, true );
Add custom display condition to Elementor Theme Builder for custom taxonomy children, grandchildren, and great-grandchildren
You did not add show in rest argument, set to true in post registration. Everything must be REST-enabled, since REST is the way block editor communicates with the rest 🙂 of WordPress
I would recommend becoming intimately familiar with the WP_Query parameters: https://developer.wordpress.org/reference/classes/wp_query/ In your particular case; dealing with taxonomies: https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters Here is the proper code to pull from a taxonomy: $args = array( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘units’, ‘field’ => ‘slug’, ‘terms’ => $term->slug ), ), ); $query = new WP_Query( … Read more
Rather than relying on a literal menu, you could use wp_list_pages possibly to better effect and sort out by certain criteria if you wish, then foreach page, display terms. Here is a little function I wrote to spit out terms for a taxonomy passed to it: // give taxonomy, will return link list to custom … Read more
One solution would be to give a value of “none” to your posts without any post group, similarly as you have “uncategorized” posts in WP Categories. Alternatively… I haven’t checked it, but why don’t you try to make another WP_QUERY like this: new WP_Query( array( ‘post_type’ => ‘page’, ‘page_group’ => ” ) )
For those running into issues in the future, this is what I did: I made my pre_get_posts function that queries the taxonomy as normal for testing if an taxonomy ID is not in a list: $q->set( ‘tax_query’, array(array( ‘taxonomy’ => ‘tax’, ‘field’ => ‘id’, ‘terms’ => tax_get_inactive(), ‘operator’ => ‘NOT IN’ ))); Then, I implemented … Read more