Is it possible to have dedicated page for parent/child taxonomy?
Is it possible to have dedicated page for parent/child taxonomy?
Is it possible to have dedicated page for parent/child taxonomy?
Could look into using get_ancestors();. It will get an array of all of the ancestors of the item in order from lowest to highest. See: https://developer.wordpress.org/reference/functions/get_ancestors/
Rewrite Rule Working for all but one of the taxonomies created
The taxonomy template you have (taxonomy-insight_type-academia.php) is in the form of (taxonomy-{taxonomy}-{term}.php), and the format for is_tax() is is_tax( ‘<taxonomy>’, ‘<term>’ ), so in your pre_get_posts callback, you should: // Use this. if ( $query->is_tax( ‘insight_type’, ‘academia’ ) ) // Not this. if ( $query->is_tax( ‘academia’, ‘insight_type’ ) ) Additionally — to avoid conflict with … Read more
This is just a half answer, but I wanted to share my findings. When adding a new term via the Add Term screen /wp-admin/edit-tags.php?taxonomy=work_type&post_type=work, AJAX is being used and it is not handling the $_FILES array, so it is empty. If you disable JS in your browser temporarily, then reload the page, add a new … Read more
I believe you can add the following to the theme’s functions.php & visit /courses/?topics=foo,bar to get the results you’re looking for: <?php /** * Custom search-query with taxonomy filter */ function wpse373353_search_query( $wp_query ) { // exit early if this isn’t that main loop on the front-end of the site if ( ! $wp_query->is_main_query() || … Read more
You could probably use some JavaScript to capture the selected option and then make an Ajax call to the REST API to fetch the corresponding posts and update the second field.
Create a custom post type for authors associated with a specific tag and provide a field for author ID. Iterate over your array of authors and for each one create a new “tag author”. Finally, create a WP_Query for this post type to generate a paginated output of data associated with the author ID.
I wanted to display the terms with the get_the_term_list function so, since categories & taxonomy have a “similar logic”, I replaced the “the_category_list” add_filter( ‘the_category_list’, ‘ci_theme_the_category_list_remove_parent_categories’, 10 ); with “get_the_terms” add_filter( ‘get_the_terms’, ‘only_last_taxonomy_terms’, 10 ); and it does what I need.
Advanced Custom Fields displaying on tag pages