This one has tripped me up in the past. If you have a collision between a taxonomy and post type rewrite, it’s important that you register the taxonomy before the post type.
Assuming you’d be ok with reworking your reviews URLs to the format /reviews/%niche%/%postname%, you’d need to change your post type as follows:
'rewrite' => array( 'slug' => 'reviews/%niche%', 'with_front' => false ),
'has_archive' => 'reviews',
your taxonomy:
'rewrite' => array( 'slug' => 'reviews', 'with_front' => false ),
and as mentioned above, do your call to register_taxonomy()
before your call to register_post_type()
. Visit Settings > Permalinks and resave to flush your rewrite rules.
Related Posts:
- Get Posts Under Custom Taxonomy
- Displaying the category name of a custom post type
- Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy
- Adding Multiple Values to a Post Meta Key
- How do I get the slug of a custom taxonomy category of a post?
- Remove custom posts that match taxonomy value
- Using Custom Posts with Metaboxes and Drop-downs
- How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?
- Sidebar links for different pages
- Get posts by name and taxonomy term
- How to display data in archive page?
- Set terms in a custom post
- Get posts of ONE taxonomy term of custom post type
- Choose whether to automatically add a taxonomy with the same name as the post
- Posts list in custom taxonomy
- Get Posts Under Custom Taxonomy
- Duplicate Custom Post Type and Taxonomy Slug
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- How to allow visitors to filter posts by multiple taxonomies
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- relating business and products with custom taxonomy?
- How To Use Custom Tax of a Post Type
- How to output all taxonomy links from a custom post type in a menu?
- How to associate a custom taxonomy to a post multiple times
- Show post count in custom taxonomy page
- How to get post count including nested categories
- Custom Taxonomy From Database
- Multiple Custom Post Type loop logic
- How to list all names and descriptions of a custom taxonomy
- 404 for some custom taxonomy not ALL taxonomy
- Multiple loops on a Search result page?
- Special Query: Title, Terms, Content – %LIKE%
- Taxonomy Category category.php not working
- Custom Post Archive Page not working
- Hiding Draft Post In Admin
- Print all the tags from a custom post type Please
- Display tag image in post using Taxonomy Images plugin index.php
- wp_get_object_terms returns only Uncategorized on first publish
- Display multiple custom taxonomy values on single custom post types page?
- Setting posts_per_page for taxonomy term template
- How to insert 2 args into 1 Wp_Query for a slideshow
- Adding custom fields to bbpress reply form
- Move first half of posts to one parent page, second half to the other page
- Get related posts of child term of custom post type
- How to add textarea field to taxonomy (tag)?
- Adding buttons to Add New Post and Add New Page
- Custom Post Type – Category Rewrite – Remove Rewrite from Sitemap
- CPT archive redirects to single post
- How to bulk-untag multiple posts?
- Show posts by a custom post author
- Help with Taxonomies
- Force the “Choose from the most used tags” meta box section to always be expanded
- Custom loop pagination links not working
- Prevent Delete Attachment by URL or When Submit
- Enable Comments Box On Custom Post Type
- wp-cli post create & media import issues
- How can i limit the number of posts created per category?
- Search results posts_orderby and ID
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- Getting Custom Post Loop to display in Bootstrap 3 column grid
- Turn On Comments On Custom Post Types in Directory Theme
- WordPress custom Query for Posts in Category display posts multiple times
- Responsive images with custom image size
- Making a custom Pagination for multi page blog post
- ERROR: Your feed is invalid (after update WP4.7) in custom types
- Editing the default page to show all posts, rather than most recent ones
- Unable to restore from backup – how to obtain old blog posts?
- Prepending %category% onto default posts fails
- get_adjacent_post by language
- Automatically add date to the auto generation of post slug
- Permission issue with custom post type – not added to menu – by plugin
- How to render taxonomy in loop of custom post_type
- How could I change my Permalink from blog to custom structure? [closed]
- Take a received feedback item, turn it into a post
- Getting value from get_post_custom
- WP Admin register taxonomy and post type performance
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- Calling Different Custom Post Timestamps in a table
- How can I setup a relationship using categories in WordPress?
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Admin – create custom post status and display above table
- custom post template file not shown, instead all the time 404.php
- How to display posts via custom taxonomy terms using checkboxes?
- Set Default Category to Username
- How to add tags (custom taxonomy) to post class css?
- How can I hide tags on a child-category page, if that tag has not been used?
- show custom post type category dropdown sorting result on same page
- Custom Post Type Rewrite To Include Parent Page(s)
- 404 error on default post type and default taxonomy fronted page
- Thumbnail & Category link aside post
- Saving custom fields to a custom taxonomy
- How to get Tags with specific post id
- Redirect to another page using contact form 7? [closed]
- How to include my own css in post
- Custom post types related to same custom post type?
- Dynamically switch template on click
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- outputting posts’ taxonomies: cant get ‘get_the_taxonomies’ working
- Is it possible to customize the post according to post format in single.php?