Can I add other Custom Taxonomy to my syntax (functions.php)
I believe you can also pass an array to is_tax: if(is_tax(array(‘country’, ‘us_state’, ‘cities’)) { return 0; } Give that a try, but otherwise what you have is fine.
I believe you can also pass an array to is_tax: if(is_tax(array(‘country’, ‘us_state’, ‘cities’)) { return 0; } Give that a try, but otherwise what you have is fine.
You can try ‘show_in_rest’ => true as an argument in custom post types along with taxonomy registration.
When importing you could create a taxonomy for each unique stance key, then add the value as a term to the taxonomy for that key, then assign that term to the post. I’d suggest something like: Store the stance keys somewhere in the database (probably as options), making sure that you don’t have duplicates. Depending … Read more
Use tha-seminar-category_add_form_fieldsaction to show on new category page. tha-seminar-category_edit_form_fields is for the edit page of the category
I found the problem. I was registering a custom post type with the same name ‘location’ as the taxonomy. Renaming one of the two did the job for me.
I can see you are trying to be clear but still a really confusingly worded question, broke my brain a bit. I think this might achieve what you want, but I’m not fully sure if I understand you correctly or not. Try it out anyway, it may or may not work: $downloads_parent_posts = get_posts( array( … Read more
Try this if( has_term(‘pude’, ‘produkttype’) || has_term(‘senge’, ‘produkttype’)) { get_template_part( ‘partials/sections/section’, ‘trustpilot’ ); }
If you want to show a term and all its parents/ancestors, you can do the following: function display_term_parents( \WP_Term $starting_term ) { $terms = []; $term = $starting_term; while ( !is_wp_error( $term ) ) { $terms[] = $term->name; $term = get_term( $term->parent, ‘kernal_category’ ); } $terms = array_reverse( $terms ); echo implode(‘ > ‘, $terms … Read more
get_the_terms() returns an array of WP_Term objects on success, so you can’t simply pass the returned array to WP_Query, and if you want to query the related posts by the term slugs, then you can use wp_list_pluck() to get just the term slugs, although you can also use the function to get any properties of … Read more
You have to re-save the permalinks when you add or change a custom taxonomy, or a custom post type. Go to the permalinks settings page, and re-save, then go back and refresh. Also, you don’t need to specify the slug as instructor if the name is instructor, the rewrite option can be removed or just … Read more