Isn’t what you are trying to achieve the point of the rewrite slug?
e.g.
if you have a news category as press and another as event then simply changing
register_taxonomy('news_category', 'stfp_news', array(
'hierarchical' => true,
'show_admin_column' => true,
'label' => __('Categories'),
'show_ui' => true,
'query_var' => false,
'rewrite' => array(
'slug' => 'about/news/category'),
'singular_label' => __('Category')) );
to
register_taxonomy('news_category', 'stfp_news', array(
'hierarchical' => true,
'show_admin_column' => true,
'label' => __('Categories'),
'show_ui' => true,
'query_var' => false,
'rewrite' => array(
'slug' => 'about/news'), // this line changed
'singular_label' => __('Category')) );
would then mean that a url of:
http://yourdoimain/about/news/events
would only show posts that belong to the events news_category.
or am I missing something?
Related Posts:
- Removing taxonomy base using WP rewrite
- Custom taxonomy on permalink
- Custom taxonomies, with custom rewrites/slug, AND loading a taxonomy archive template from a plugin
- WP redirects pretty permalink to query string
- Add parent/child taxonomy to custom post type url
- Taxonomy with_front causes all
- 404 error- issues with pages after adding custom rules for posts
- How to overwrite registered taxonomy url from vendor plugin in child theme
- How to add a Rewrite Rule / Category Structure
- Custom permalinks with hierarchical taxonomy – getting PHP warning
- Taxonomy Pagination Rewrite
- how to change permalinks format for pagination?
- Rewrite Rules returning wrong data
- How to change url for taxonomy pages?
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- How to change Custom Permalink for Taxonomy? (remove the slashes from term-slug)
- How do I get the correct URL?
- How to structure all custom-taxonomy with three verbs(a,b,c) and route them accordingly?
- Rewriting url for multiple Taxonomies and Custom Post Type
- Custom rewrite url structure for several custom taxonomy (NOT pos_type)
- Hierarchical taxonomies in permalink cause 404 for sub term archive
- Permalink structure not working with Custom Taxonomy (URL like ./taxonomy/category/postname)
- add_rewrite_rule using custom taxonomy and year
- Rewrite URL for a specific taxonomy [duplicate]
- custom taxonomy and pages rewrite slug conflict gives 404
- WordPress Rewrite Rules for Custom Post Type and Taxonomy
- Custom Taxonomy Endpoint Pagination using paginate_links()
- Can’t get a custom template taxonomy page to display
- How to modify URL structures in custom post types and taxonomies or terms
- Archive page with multiple taxonomies rewrite
- Taxonomy archives based on Custom Post Type
- Permalink rewrite with custom post type and custom taxonomy
- Rewrite rule for custom taxonomy
- Nice URLs for a Custom Post Type List with a Shared Custom Taxonomy?
- How do I rewrite a url to use %taxonomy% instead of %category% when multiple taxonomies are present?
- WP Rewrite Rules – Custom post type & taxonomy
- Remove base slug in CPT & CT, use CT in permalink
- term_link() filter or rewrite and howto?
- Removing the base “Author” or changing it to something else. is it possible?
- Permalinks for quote authors
- Custom Permalink for Taxonimie and Custom Post Type
- How do I get WordPress URL rewrites into Sitemap?
- Keep taxonomy base name in post permalinks
- Create multiple rewrite endpoints for custom taxonomy archive
- Permalink Structure CPT With Custom Taxonomy Fails
- Permalinks for custom taxonomy stopped to work
- Remove url rewrites for registered taxonomies
- Change the permalink URL to include a taxonomy term
- Page and Post return 404 with custom taxonomy
- Customize Custom Post Type URL
- How do I change the custom taxonomy slug to be the same as the custom post type slug?
- WP Rewrite Rule Issue while using Custom post type & taxonomy
- Custom Permalinks with CPT and Hierarchical Taxonomies
- How do I modify taxonomy term slugs dynamically?
- Permalink help with default Posts and custom Taxonomy
- Add Taxonomy Subcategory To Permalink
- How do I create a permalink structure with 2 taxonomies
- How to get list of taxonomy slugs ordered parents>childs?
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- Rewrites with hierarchical taxonomies in permalink
- Rewrite rules for varying nested terms of custom taxonomy
- How to rename custom taxonomy URL with extra words
- Custom URLs in Custom Search Results
- Query custom taxonomy by term id?
- Custom Taxonomy specific to a Custom Post type – rewrite URL
- Why is flush_rewrite_rules mandatory after registering custom taxonomies?
- Permalink Problems
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- How to add hierarchical taxonomy with parent child relation to URL?
- Clean Custom URL for Serach + Custom Taxonomy
- WordPress custom permalink and archive link for custom post type
- How to rewrite the post slug of a custom post type post
- Custom rewrite permalink doesn’t work
- forward/redirect taxonomy archive of term to a page with same name
- URL rewriting taxonomy term
- Modifying rewrite rules to use /category//
- Permalink issues with custom taxonomies
- Remove cpt slug from url and use custom taxonomy instead breaks all other cpt
- Taxonomy URL rewrite whilst keeping filtered posts?
- How to properly set the rewrite rules for this case?
- How to replace custom post type with custom taxonmy in permalinks
- True or F False Setting of ‘with_front’ Parameter of Rewrite Is returning Exact Same result
- Multiple Custom Taxonomy Rewrite
- Change CPT permalink to use the category
- How to fix 404 on post after prepending Custom Post Type url with Custom Taxonomy Term slug
- Remove taxonomy name and add .html extension in the custom taxonomy term URL
- How to build overlapping custom post_type and taxonomy rewrites without conflicts?
- Custom Post Type rewrite url to /category/pagetitle [duplicate]
- page not found for example.com/custom-post-name
- Need help understanding a rewrite with multi-level taxonomy
- If term and page have the same slug, how can I view the term archive?
- Why won’t this rewrite rule work?
- rewriting for custom taxonomy rewrite
- Parent cpt/child custom post type URL permalink relationship
- Taxonomy to WordPress Permalinks of custom post type
- Custom Taxonomy in Permalink from post type
- New rewrite rules for custom taxonomy and reuse default
- Custom Taxonomy Archive URL rewrite
- Filter posts and custom taxonomy using add_rewrite_rule
- Two taxonomies with the same slug