Storing data into custom taxonomies VS post custom fields (post meta)
Storing data into custom taxonomies VS post custom fields (post meta)
Storing data into custom taxonomies VS post custom fields (post meta)
For your author content display, instead of print_r($all_term_meta); try a foreach: foreach($all_term_meta as $meta) { return $meta[0]; } It’s possible you may need to use “echo” instead of “return” but try “return” first. To control whether or not there is an author tab, update your woo_new_product_tab function with the same condition: function woo_new_product_tab( $tabs ) … Read more
Custom taxonomy sort by term meta in admin columns
You can add a custom tax_query to your filter, and pass the search query to it: function searchfilter($query) { if ($query->is_search && !is_admin() ) { $s = $query->get( ‘s’ ); $query->set(‘post_type’, [ ‘lesson’, ‘series’ ] ); $query->set( ‘tax_query’, [ [ ‘taxonomy’ => ‘your-taxonomy’, ‘field’ => ‘name’, ‘terms’ => $s , ] ] ); } return … Read more
How to display custom taxonomy in multiple columns?
Keep taxonomy base name in post permalinks
Here is the solution I ended up with. This may help others too. $taxonomy = “product-category”; $args = array( ‘taxonomy’ => $taxonomy, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘hierarchical’ => true, ‘hide_empty’ => false, ); $the_query = new WP_Term_Query($args); $categories = $the_query->get_terms(); if ($categories){ foreach($categories as $category){ $ancestors = get_ancestors( $category->term_id, $taxonomy ); $category->ancestors = … Read more
The problem is that category_name is a reserved keyword for the built-in categories for posts. Almost anything category_* is reserved. You can find a list of reserved keywords at the following url: https://codex.wordpress.org/Reserved_Terms This includes, but is not limited to: cat category category__and category__in category__not_in category_name term terms Behind the scenes it sees that you’re … Read more
Getting yoast title for custom taxonomy
Refresh Taxonomies