No, it’s not safe to use the /books/
URL for both a category base and custom post type base. WordPress uses the URLs to determine what type of content to serve. If you’ve set up 2 different types of content at the same URL, it won’t have any way to know which you’re requesting, and if you end up with a book slug that’s the same as a category slug, you’ll really have conflicts.
To keep the URL types segregated but still logical, you could use URLS such as
CPT: example.com/book/title-of-a-single-book
Category: example.com/books/category-name
Or, perhaps something like
CPT: example.com/books/title-of-a-single-book
Category: example.com/book-categories/category-name
Or, continue using your workaround, example.com/books/category/category-name
, and they will all appear to be under “books.”
Related Posts:
- Adding categories to custom post type in permalink
- How to change permalink structure for custom post type and it’s taxonomies?
- Is there a way to use regular categories with custom post types?
- On clicking on the category name the page is redirecting on 404 pge
- How to show custom taxonomy in the permalink?
- Custom post types and permalink
- Get a permalink structure of /%posttype%/%category%/%postname%
- Custom Post Types and independent Categories – complex Taxonomy
- Add custom post type settings to wordress default posts
- Can’t remove front from permalinks for custom taxonomy category page
- Remove CPT name from permalink but add %category% instead
- Custom Post Type with modified permalink structure results in 404
- Custom post type category permalinks and archive pages
- Searching in multiple category + URL hierarchy in real estate WordPress site
- Modify category permalink to use post type slug
- Category permalinks don’t work even after flushing
- Adding categories to custom post type in permalink
- Change custom post type permalink according to category
- how to use two permalinks for one custom post type based on categories
- Get full control over custom post type url
- How to switch from custom post type URL to category URL?
- Custom Post Type + Category archive
- Category / Custom Post Type permalink issue
- Custom Post Type Permalinks with %category%
- Remove slug from Custom Category Permalink + dual-category permalinks
- Custom post type and category permalinks
- Is it possible for post and custom post type to share a category base slug?
- Taxonomy, Terms, and Template Files
- Exclude a category from WP_Query
- Custom Post Types on Category Pages
- Adding meta values to permalink
- How to list all categories and tags in a page?
- Hierachical Custom post types permalinks not working
- Custom Posttype Inheritance (and url structure)
- Pagination not working with custom category template
- Rewrite permalinks for custom posttype and custom taxonomy
- How to check if last uri segment is a custom post type or taxonomy term?
- Anyway to assign custom post types to a specific category?
- List with categories, subcategories and posts of custom posttype
- Custom Post Types, Custom Taxonomies and Permalinks ?
- Automatic category for a Custom Post Type
- How can i list custom post type categories?
- Query Custom Post by Category
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Display Custom Category (taxonomy) Name in Custom Post Type
- removing custom tax & CPT slug, adding taxonomy term in front of custom type
- Different permalink for CPT and regular Posts/Pages but why?
- Filter categories of posts with checkboxes
- Permalink Structure CPT With Custom Taxonomy Fails
- Use post as category
- Bizarre Permalinks Issue: 404 Errors Everywhere
- Making a custom help center page
- Display all posts in main category and 1 subcategory
- Custom post type getting wrong categories and tags
- Can’t get custom rewrite tag, query var, permastruct (permalink structure), and rewrite rule to work properly together
- WordPress custom post type permalink rewrite shows page not found
- Removing custom post type slug from URL
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Customize Custom Post Type URL
- How to have this permalink structure: post_type/postname/custom_inner_page
- Additional section in custom post type permalink
- I am having Trouble to get list of Categories of Custom post Type
- Use the same date-based permalink structure for all post types
- Categories filtering in new post
- Rewrite rule for Custom post type Monthly and Yearly archive
- menu link to custom post_type?
- Custom permalink with child taxonomy terms
- WP the_posts() on single-cars.php get category link
- How do you create %post_type%/%postname%/ permalink structure?
- Problems with 404, .htaccess, permalinks and WordPress custom posts locally on Snow Leopard
- How can I have different content for different countries?
- How to include category name/id in wp_query for retrieving “custom post type” from a particular category?
- Include custom post type custom taxonomies in Categories widget
- How to get all posts related to particular category name on button click?
- custom query with custom post type and category slug
- WordPress custom post categories and subcategories on category.php
- Use post in multiple places on a page with multiple posts
- How to setup a permalink structure for a custom post type
- Can’t pull posts of a Custom Post Type based on the custom taxonomy of the CPT
- Archive Template being used instead of Category Template for Custom Post Type
- Custom post type specific category box
- Custom Taxonomy Taxonomies of Same Name point to first created URL
- Custom post type, permalink, add query variables problem
- category.php not showing custom post types
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- How to output custom post type title on custom page with category next to it?
- CPT relations use in permalinks under single post type
- Create custom post type categories
- hierarchical Custom post type child permalink not found
- Remove CPT Slug with 2 taxonomies and 1 post meta
- How to create groups like that in buddypress?
- Getting list of Categories for Custom Post Types
- Custom Post type and Taxonomy in post URL error
- Multiple Custom Post Type permalink issue
- Exclude categories For Custom post types
- Custom Post Types and rewrite rules – One CPT works and a cloned one doesn’t
- Display all post types together
- What is the proper way implement a global $wp_rewrite?
- How can you preserve URLs when moving posts to a custom post type?
- Categorizing Custom Posts in Bulk Based on Title