Make child taxonomy categories use a set template

WordPress has a Template Hierarchy – specifically for taxonomies and terms. So what template name you want should follow along the lines of: taxonomy-{$taxonomy}-{$term-slug}.php In your case: taxonomy-classifications-cheese.php This will grab onto the cheese category and display this specific template. I’m not entirely sure if this will also catch child categories ( I would test … Read more

How to display ACF taxonomy checkbox links on WooCommerce product category archive

The issue has been solved. See below for the correct code to display ACF multiple taxonomy links on WooCommerce product category archives. Specifically note the string: $related_terms = get_field(‘quick_links’, $taxonomy . ‘_’ . $term_id); $queried_object = get_queried_object(); $taxonomy = $queried_object->taxonomy; $term_id = $queried_object->term_id; $related_terms = get_field(‘quick_links’, $taxonomy . ‘_’ . $term_id); if( $related_terms ): ?> … Read more

How to add current custom taxonomy slug to body class

You can follow similar approach with get_the_terms. Here is the function. function add_taxonomy_to_single( $classes ) { if ( is_single() ) { global $post; $my_terms = get_the_terms( $post->ID, ‘custom-taxonomy’ ); if ( $my_terms && ! is_wp_error( $my_terms ) ) { foreach ($my_terms as $term) { $classes[] = $term->slug; } } return $classes; } } add_filter( ‘body_class’, … Read more

Weekdays as terms – How to order taxonomy terms by ID in admin panel?

Method #1 – Modifying the query arguments If we want to modify the term order for the schedule_day_taxonomy term checklist, on the single schedule cpt edit screen, then we can use the following setup: add_action( ‘load-post.php’, function() { add_filter( ‘wp_terms_checklist_args’, ‘wpse_terms_checklist_args’ ); } ); function wpse_terms_checklist_args( $args ) { // Target the ‘schedule’ custom post … Read more