I added a rewrite rule manually.
add_rewrite_rule('^bar([^/]+)(/[0-9]+)?/?$','index.php?bar=$matches[1]','top');
right after
add_action('init', 'register_taxonomy_bar');
in functions.php.
But WordPress is SERIOUSLY DENSE in translating /bar/foo/
to barfoo?bar=foo
and I don’t know how to get around this nonsensical “barfoo” in the path. I also have no idea what it’ll do to paging. Also this has to be defined for each and every custom taxonomy.
Nevertheless, it works, sort of.
Related Posts:
- 404 Error on Custom Post Type / Custom Taxonomy
- Custom taxonomy rewrite in permalinks for posts gives 404 on pages
- Can’t get a custom template taxonomy page to display
- Custom taxonomy listing page when no term set (all terms)
- Removing taxonomy base using WP rewrite
- Custom taxonomy on permalink
- How to enable hierarchical permalinks for hierarchical taxonomies
- Custom Taxonomy Leads to 404 Page – Permalink Structure Flushed
- Remove Custom Taxonomy Base
- How can I set up a category “overview” page?
- Nice URLs for a Custom Post Type List with a Shared Custom Taxonomy?
- Dynamic page slug for Custom Taxonomies?
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- How to fix a double slash in custom permalinks with hierarchical taxonomy’s?
- Getting archive pages in WP’s AJAX internal link finder?
- custom taxonomies on permalink
- Pros and cons of using [taxonomy name] in place of [category name]?
- Permalinks for quote authors
- Change in custom taxonomy permalink causes 404 error for another custom taxonomy
- Taxonomy based permalinks
- custom taxonomy archive permalink shows 404 error
- Custom taxonomy term in WooCommerce product permalink
- Change URL structure of subcategory archive pages
- Add parent/child taxonomy to custom post type url
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- custom post type and custom taxonomy url conflict
- Keep taxonomy base name in post permalinks
- Category page for custom-taxonomy shows 404 when using custom permalink structure
- Change permalink of post if it belongs to custom taxonomy
- Permalinks for custom taxonomy stopped to work
- Date archive permalinks for custom taxonomy
- 404 error- issues with pages after adding custom rules for posts
- Custom taxonomy in URL showing 404
- Custom permalinks with hierarchical taxonomy – getting PHP warning
- How do I modify taxonomy term slugs dynamically?
- Permalink help with default Posts and custom Taxonomy
- how to change permalinks format for pagination?
- Replace taxonomy permalinks
- How do I create a permalink structure with 2 taxonomies
- Custom post type permalink tag 404
- Base permalink for custom taxonomy
- Rewrite Rules returning wrong data
- Hierarchical permalinks for custom post type and taxonomy
- How to change url for taxonomy pages?
- How to solve this custom post type goes to 404 page?
- Query custom taxonomy by term id?
- How to customize custom taxonomy url?
- Permalink Problems
- Duplicate slug/permalink issue
- How to add hierarchical taxonomy with parent child relation to URL?
- How to filter a custom post type by custom taxonomy without 404
- WordPress modify Settings > Permalinks (options-permalink.php) Add CPT Permalink Options
- Custom Taxonomy Breaks Pages
- How can I add a custom permalink to a term?
- Permalinks with custom taxonomies and regular categories
- Safe to throw 404 error in request filter?
- Need equivalent of single_term_slug
- How to define %category% for custom taxonomies?
- Custom Permalink Structure for terms/taxonomies of custom post type
- Custom taxonomy throw error 404
- How Can I Remove Child Slug From Grandchild Slug When Using Duplicate Grandchild Slugs?
- Change the full permalink (URL) of a single post by connecting it to a specific page
- Prioritise Pages over Taxonomy Term Root Archive, but not Taxonomy Term Child Archives
- How can I rewrite the URL of my custom taxonomy to include the year?
- How do I get the correct URL?
- Remove custom taxonomy slug from URL
- How to replace custom post type with custom taxonmy in permalinks
- problem : Custom taxonomy template not showing
- Get taxonomy link with post type slug prefix
- How To Create Dynamic Permalink To Custom Taxonomy List of Current Posts?
- Restructuring permalink with more than one taxonomies
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Hierarchical taxonomies in permalink cause 404 for sub term archive
- Custom taxonomy return 404
- Permalinks incorrectly inserting multiple categories
- Custom Taxonomy Archives Page Errors
- Error 404 in Custom taxonomy with pagination
- WordPress Taxonomy Permalinks – Custom?
- Need help understanding a rewrite with multi-level taxonomy
- Permalink Rewrite to include Custom Taxonomy Term
- Multiple taxonomies, what should the permalink look like?
- Taxonomy to WordPress Permalinks of custom post type
- Permalinks not working on MU network with domain mapping
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- Optional taxonomy in cpt permalink
- post_type_link not working for posts without terms
- Child terms with improper parent in the url should redirect to 404
- Listing child terms of parent term
- Last posts from custom taxonomy
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- Taxonomy with_front causes all
- Why is my taxonomy template not shown?
- How to add a Rewrite Rule / Category Structure
- How to have two different versions of a tag/category/taxonomy archive page?
- how does the wordpress rest API work
- tax_query not working
- wp_query not resetting, last post hanging
- Display children category images
- Taxonomies, Adanced Custom Fields and Repeatable Fields
- Custom taxonomy archive templates not found