This worked fine for me, except the whole system above has some issue with my configuration (I made my wp installation Multisite) that broke all the other posts. They are all not-found, although the permalink is retrieved correctly every time, as it was found.
I’m opening a new question for that other issue here so you can also use the code above safely.
function term_link_filter_function( $termlink, $term, $taxonomy ) {
if ( strpos('listing_type', $termlink) === 'FALSE' ) {
return $termlink;
} else return str_replace('/listing_type', '', $termlink);
}
add_filter('term_link', 'term_link_filter_function', 1, 3);
Related Posts:
- Order get_terms() By Custom Field
- How can I select a primary category?
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- Display empty taxonomy terms with get_terms()
- Get a list of Terms for a specific category
- Limit number of terms that a custom taxonomy can save per custom post type
- Get posts from specific taxonomy term
- Display custom taxonomy attached to the post on post single page
- Ive got a term (get_term_by) but now I want to filter it by a category it is in?
- Get Categories Where Taxonomy Equals ‘n’
- Showing HTML if Post is In Certain Taxonomy Term
- Post to inherit custom category background image from parent
- List taxonomy terms assigned to a post in hierarchical view
- Ordering terms whilst in loop
- Get WooCommerce product category list in functions.php
- Display List of Categories Within a Custom Taxonomy
- List Terms by category
- Can’t custom taxonomies have same terms (slugs) as categories?
- get_categories for custom post type with a specific custom taxonomy attached
- Combine two taxonomies in a hierarchical tree
- How can I get category ID by category name?
- get_terms name__like list categories according to letter
- Use tag interface for hierarchical taxonomy?
- Using URL parameters, list posts from category and custom taxonomy
- Different templates for parent and children categories/taxonomies
- Show Post from parent category (custom taxonomy) ONLY!
- Excluding posts from a category but only if they’re not in multiple categories
- Add custom taxonomy terms to WordPress menu dynamically & append #slug to url
- Getting the sub category
- How to have Multiple Archives Widgets, one archive widget per category (in a different page)?
- Use get_term_children to get the sub category of a parent category for the current post
- Update wordpress post terms programatically
- Are Custom Taxonomy Templates Possible?
- “Sticky” posts for each category (archive.php)
- When to use ‘get_category_by_path’ vs. ‘get_term_by’ to get category object from `get_query_var( ‘category_name’ )`?
- How can I convert some categories to a custom taxonomy?
- PHP Fatal error: Cannot use object of type WP_REST_Response as array in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
- How to know if it’s a child taxonomy?
- wp_dropdown_categories and custom taxonomy + custom post type
- How do I get a list of all categories that a given user has written blog posts for?
- Specifying multiple categories in URL (permalink)?
- Set post categories to include parents when setting child category
- Should the actual /category/ directory be 404? Is that normal WP behaviour
- Inserting Category programmatically
- Change existing taxonomy settings when using custom taxonomy
- Display Taxonomy Terms in an option tag with value being the slug
- Allow user to set custom order to a list of custom taxonomies?
- One Specific Category To Permalink
- Why does the argument list_only do on Walker_Category_Checklist::start_el?
- add_rewrite_endpoint returns 404 on archives
- Categories overview that links to page displaying posts
- Get Number of total Parent Categories for Custom Taxonomy
- Get posts under a category with SQL
- WordPress alphabetical A-Z custom post type post result display
- Limit categories and it’s subcategories for specific group of users
- wp_dropdown_categories not showing option as selected
- Get a count of how many times a term or a category is used in posts
- add slug beside name in Admin Category Checklists
- How to Display Posts From Category Within a Custom Taxonomy?
- Display sibling categories on category page
- Count tags for a specific category
- Having a template per category? Bad for server overhead?
- The Difference Between Categories and Tags and Taxonomies and Terms
- Echo text using is_tag
- set terms to category and subcategory
- Same menu for different taxonomies to reach different content
- Get terms for a specfic post from multiple taxonomies in custom post type
- How to store category and tags separatly on wordpress?
- Category link redirect to custom template page instead of index.php?
- How could I write a get_categories_by_year() function?
- Show single Child Category on Custom Post
- wp_delete_term or wp_delete_category?
- 3.1 post formats and specific categories/custom taxonomies
- Automatically add custom taxonomy to posts in a category
- How to set the same base url for two different taxonomies?
- Can’t display posts by filtering categories using isotope.js
- When creating a new product, auto assign it to all custom taxonomy woocommerce
- I want to create a custom taxonomy page showing a list of subcategories
- List non-empty categories from a custom post type
- Renaming default category taxonomy?
- Most efficient way to display current post subcategories?
- Categories and Tags Conflict after Woocommerce Installation
- get_terms sort order with child categories of varying depth
- Getting a sub category based on a category name
- How to Manage and link certain custom taxonomy?
- Getting Post Tags From Certain Categories
- How to add a post with new Taxonomy without assigning to default category?
- How to add additional field to Add new category part (without plugin use) [closed]
- Category and tags goes 404
- Get a list of categories ids
- How to create default categories in new installs?
- Check if value is a custom taxonomy category name
- 2 loops in archive.php (one for each category)
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Problem importing categories and sub-categories
- finding out the top 5 source ( source is a custom taxonomy ), in a given category
- Modify functions.php to add a term ‘uses-theme’ set to theme name on post save
- Converting Categories (with ACF fields) to custom taxonomies
- Taxonomy term RestApi data 10 rows limitions
- List the category tree of all the product_cat categories