deleted_$taxonomy not getting fired
deleted_$taxonomy not getting fired
deleted_$taxonomy not getting fired
Replace the line <a href=”https://wordpress.stackexchange.com/questions/328132/<?php the_permalink(); ?>”>View All</a> with <a href=”https://wordpress.stackexchange.com/questions/328132/<?php echo get_term_link($term,”series’); ?>”>View All</a> Reference: Codex Page
Yes, you can. get_terms function takes $args as first param. And you can use the same args as with WP_Term_Query. Two arguments that may interest you are: child_of – (int) Term ID to retrieve child terms of. If multiple taxonomies are passed, $child_of is ignored. Default 0. parent – (int|string) Parent term ID to retrieve … Read more
You haven’t passed the labels to register_taxonomy() correctly. That function works the same as register_post_type(), and you need to pass the labels the same way: as part of a ‘labels’ array in the arguments. Please refer to the documentation for the full list of accepted labels, but essentially, you need to organise the arguments this … Read more
custom taxonomies menu
Here is a quick solution, that may guide you to desired result. $years = get_terms( array( ‘taxonomy’ => ‘product-year’, ‘hide_empty’ => true, ) ); $cats = get_terms( array( ‘taxonomy’ => ‘product-cat’, ‘hide_empty’ => true, ) ); if ( ! empty( $years ) && ! is_wp_error( $years ) ){ foreach ( $years as $year ) { … Read more
I’m only going to focus on the category listing you have in the code above and ignore the custom query since that’s not what you’re asking about. <?php // I assume the custom taxonomy slug is “basics” $categories = get_the_terms( get_the_ID(), ‘basics’ ); // get_the_terms returns false, a wp error, or an array of term … Read more
If by “slug title” you mean a taxonomy (e.g. product category), then have a look at the code posted on the accepted answer on Display All Products by Category with WooCommerce It should give you an idea (or even the complete solution) how to get your posts listed.
You forgot to add the existing taxonomies to the array you’re returning. try this: function get_new_taxonomies ( $taxonomies) { return array_merge($taxonomies, get_object_taxonomies(‘my_custom_post_type’)); } add_filter(‘wp_taxonomies’, get_new_taxonomies ); $wp_taxonomies_result = WP_Taxonomies::get_taxonomies();
According to the ACF documentation on getting field data from fields attached to terms, you want to do something like this: $term = get_queried_object(); $area_singular = get_field( ‘area_singular’, $term );