Save selected terms in order of custom taxonomy in post
Save selected terms in order of custom taxonomy in post
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
I was able to solve this by removing CPT UI plugin, registering the custom post type with: function create_post_type() { $args = array ( ‘public’ => true, ‘has_archive’ => true, ‘show_ui’ => true, ‘supports’ => array(‘revision’,’title’,’editor’,’author’, ‘thumbnail’, ‘custom-fields’), ‘taxonomies’ => array( ‘category’ ), ‘labels’ => array( ‘name’ => __( ‘work’ ), ‘singular_name’ => __( ‘work’ … Read more
Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
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
Warning: call_user_func_array() expects parameter 1 to be a valid callback
A 404 is the expected behaviour. You’ll find no link to such a URL in the WordPress admin, there’s no functions to generate that URL in code, and there is no possible template for such an archive, as shown in the Template Hierarchy documentation (archive-movie-genres.php is not a valid template). The path /movie-genres alone will … Read more
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
Instead of showing a 401, why not just add the URL to a robots.txt and the search engine will ignore it from indexing. You could also manually add to the headers a meta robots to noindex the page. You could run this via .htaccess to redirect a page to somewhere else (or show 401), but … Read more