Internally wp_list_categories()
uses get_term_link()
for the URL of the terms. That function can be filtered using the term_link
filter, so you could filter any links to the current term and replace them with links to the post type archive:
function wpse_307202_term_link( $termlink, $term, $taxonomy ) {
if ( is_tax( 'cat_projet' ) ) {
if ( get_queried_object_id() === $term->term_id ) {
$termlink = get_post_type_archive_link( 'post_type_name' );
}
}
return $termlink;
}
add_filter( 'term_link', 'wpse_307202_term_link', 10, 3 );
Related Posts:
- Taxonomies not appearing in columns on dashboard
- How to display term description in empty terms archive?
- Save Filter for Taxonomies
- Amend taxonomy to search in wordpress admin
- Include get_term_link inside search
- transfer two existing taxonomy terms into one custom metabox
- Sort Taxonomy List by Custom Values
- How to get WooCommerce Product Category Link by ID?
- Contact Form 7 – Populate Select List With Taxonomy [closed]
- Why is my working Custom Taxonomy not in get_taxonomies array?
- Custom taxonomy on permalink
- How do I filter posts by taxomony using AJAX
- How to return a list of custom taxonomy terms via the Gutenberg getEntityRecords method
- Create taxonomy with meta term using the WP Rest Api
- Get current term’s ID
- How to modify default taxonomy field to a single text field?
- How to set hierarchical terms to a post using wp_set_object_terms
- Echo taxonomy term meta on author.php
- Hierarchical display of custom taxonomy
- How to output the taxonomy term name in a widget
- How to link categories to custom taxonomy terms?
- Is It Possible To Have Shared WordPress Custom Post Types?
- WordPress renames slug of tags used in multiple taxonomies?
- Allow only 1 instance of each term in each custom taxonomy
- Getting yoast title for custom taxonomy
- get_terms: determine if taxonomy term has children
- Set a taxonomy as private
- “show option all” on list categories doesn’t display taxonomy
- meta_key & meta_value not working with get_pages and custom taxonomy
- display taxonomy slug from term ID
- Redirect all child taxonomy to its parent
- Wrapping result of the_terms in a span with a class of the term name
- How do I taxonomy terms based on terms they are used alongside?
- How can I populate a select element with terms from a custom taxonomy and filter post results?
- How do I list the pages of a custom taxonomy?
- Categories of custom taxonomy don’t show any posts
- What is faster: custom taxonomy or serialized post-meta for db retrieval? (over 60,000 posts)
- Get taxonomy based on another taxonomy slug
- Display a grid of taxonomy terms at root taxonomy page
- Why does a new taxonomy term get created when I assign an existing term to a post?
- Add Image Uploader In Admin Panel
- Tell the difference between a term and page when they have the same ID
- Getting associated taxonomies
- How to use multiple archive templates for a taxonomy?
- Custom Taxonomy Query
- WordPress implode & wp_insert_post question
- how can i display taxonomy instead of category on my web page?
- Taxonomy Meta Box in User Profile?
- Question on using custom structures for categories
- Proper way to update the slug of a taxonomy using register_taxonomy? [duplicate]
- Displaying Custom Taxonomy without a hyperlink
- Is it safe to register a taxonomy without using any hooks?
- Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
- Show Taxonomies with admin area for custom post type?
- How to group all terms children’s in custom taxonomy?
- Show template part if part of term
- Build filter for post-type + multi taxonomies + multi terms
- Corrupted nav-menu?
- Remove taxonomy widget from “PAGE” post
- List Top 5 taxonomy terms based on number of post
- Register `product_cat` taxonomy for default post post type
- Custom Taxonomy Not Saving in Front End Post
- Taxonomy.php how to show post only in current taxonomy with wp_query?
- Display taxonomy with a maximum number of letters
- Don’t display taxonomy if empty
- Taxonomize taxonomy terms?
- Creating a drop-down and filter button for two custom taxonomies assigned to a custom post type
- Set two terms for a post when they differ only by an accent
- Keeping session instance of random display results over pagination breaks
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- display taxonomy terms with link
- Custom field with terms from another taxonomy programmatically
- Listing Cities A custom taxonmy by selection order
- Template taxonomy-{taxonomy}.php doesn’t show my posts
- Can I get thumbnail of taxonomy?
- How to filter a page title with custom taxonomies
- setting a custom post type taxonomy term by code
- Custom Taxonomy Not Being Recognized by is_tax()
- How can I rewrite a custom taxonomy archive slug
- How to truncate the description in the admin panel for a custom taxonomy
- What’s the url queryvar for a taxnomy archive?
- set_object_terms for custom taxonomy in custom post type – not working
- Get all users attached to a taxonomy
- Display taxonomy posts
- Add image to taxonomy and output to homepage
- Remove taxonomy menu without removing the metabox?
- How to perform a search inside a specific taxonomy category
- Sorting Custom Taxonomy in ASC/DESC order?
- How can i set post_per_page in my taxonamy?
- Exclude 2 in 3 terms of A Taxonomy from all Archives
- Select default taxonomy on dropdown
- WordPress Taxonomy Menu
- Filer taxonomy posts by current category
- Loop custom post type by taxonomy (Category)
- get_terms() – unexpected ‘=>’ (T_DOUBLE_ARROW) error
- get_term_children specific no id
- Custom Search only for my Custom Taxonomy Page – data
- Add custom display condition to Elementor Theme Builder for custom taxonomy children, grandchildren, and great-grandchildren
- Add text in custom taxonomy
- How do I check if a post has a term with a particular ancestor/parent?