Sounds like you are doing it right. If you will add a rule per entry you will slow down the whole URL parsing, especially for pages.
About the 404. If you are actually redirecting, then it means that you don’t send a 404 as there can be only one return code.
Related Posts:
- How to achieve this permalink -> category-name/custom-post-type-name/post-name
- Prepend meta_value to permalink of post
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- Custom post type with slug for plural (archive) and for single
- CPT custom archive template does not get loaded
- Am I using the flush_rewrite_rules function in the right place?
- Adding Post id to the end of slug in a Custom Post Type
- Two CPT: one is using part of the custom rewrite slug from the other
- Custom taxonomy archive slug overwrites static page
- Get the custom post type slug but remove the rewrite prefix?
- How to make nested custom post type slugs work
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- Theme localization of “slugs” (custom post types, taxonomies)
- Where, When, & How to Properly Flush Rewrite Rules Within the Scope of a Plugin?
- CPT Template Not Showing – Getting 404
- How do I get a post (page or CPT) ID from a title or slug?
- Using Custom Fields in Custom Post Type URL
- Adding meta values to permalink
- Dynamic taxonomy in permalink made all other posts NOT FOUND?
- Post slug changed using code doesn’t reflect on editor when post is published
- How to check if last uri segment is a custom post type or taxonomy term?
- Pagination Doesn’t Work
- Permalinks using event date (year & month) instead of publication date
- WP Rewrite Rules – Custom post type & taxonomy
- Reslug a Custom Post Type
- Removing CPT slug from URL results in 404 error for archive page
- Getting Post ID from slug during init
- Custom post type’s slug gets wrong when adding a custom meta box
- Can’t edit Custom Post Type slug/permalink
- Disabling post_type in URL
- single-{post_type}.php is not loaded despite flushing rules
- Custom Permalink Tag breaks Pagination
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Rewrite numeric ID parameter for hierarchical custom post type
- Pagination problem
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Automaticly add slug to posts
- Rewrite WordPress URL to show CPT meta field data
- Custom Post Type won’t Register
- Custom post types archive redirect
- Remove post type slug of all post types from permalinks
- Making a custom help center page
- Rewrite post type slug only for child theme
- Child post with numeric only slug keeps redirecting to parent
- Permalink for a custom post type isn’t working and I don’t know why
- Can’t get custom rewrite tag, query var, permastruct (permalink structure), and rewrite rule to work properly together
- How can I make the slug of the taxonomy also the slug of the custom post
- Assign same parrent Page to pages AND custom post types
- Customize Custom Post Type URL
- Hide or disallow default custom post type url?
- A case for Hierarchical Custom Posts
- Multiple (two) category postings on the same page.
- Rewrite CPT child page URL to support query var
- Flush Rewrite Rules when new site is created on network
- Pretty URLs and custom post types
- Specific routing for CPT
- Rewrite rule for Custom post type Monthly and Yearly archive
- Best structure / rewrite rules to achieve the following url
- Properly flush rewrite rules on plugin activation
- How do you create %post_type%/%postname%/ permalink structure?
- Slug for custom post type
- Custom Rewrite Rule for Custom Post Type with URL Param
- WordPress custom slug rewrite
- Custom post type paging 404 error
- WordPress Custom Post Type – Rewrite Query
- Set parent for custom post type archive rewrite url
- Changing CPT slug and taxonomy already registered in parent theme
- Custom Endpoint For Custom Post Type from Child Theme
- Rewrite rules for custom post type
- Custom taxonomy and post type rewrite rules
- Url Rewriting a dynamic wordpress page with parameters
- Custom post type and multi taxonomies + customize url
- Show code dependant on CPT & category
- How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?
- Redirect Custom Post Type from Child Taxonomies
- Change permalink incrementor into pseudo-subdirectory
- Custom Post Type duplicating slug for new posts
- Pagination URL in Custom Content Type
- WP gives 404 error for custom post type with GET variable
- Custom post type rewrite and wp_pagenavi interfering with each other
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- Generate slug and meta data if meta field is empty
- redirect old post type url to new structure url
- Multiple Custom Post Type permalink issue
- Custom post type child page 404
- Costum post type with costum (sub)taxonomy
- Remove Custom Taxonomy Slug only without removing Custom post type slug in permalinks
- How to rewrite CPT-Permalinks the correct way (incorporating meta-box-data)?
- CPT Template Not Showing – Getting 404
- Display results from two Custom Post Types in page template
- Create page using same slug as custom post type
- 404 Error On Custom Taxonomy Pages 2, 3, etc
- CPT Archive Pagination – Page not found
- Custom Post Type with multiple Custom Taxonomies / Hide Taxonomy Slug from URL
- Custom archive URL as a subfolder of the custom post type slug
- Is it possible to use a post name in a custom post slug?
- Custom slugs with dates & IDs on Custom Post Type
- Add post id to url instead of WordPress default -2 suffix
- Taxonomy Archive URL + Template