Based on the new details in the question:
Instead of creating a separate “type2” post type, you could:
- Put all the data together in the “type1” post
- Have the “type2” permalink (example.com/taxonomy/type1/type2/) redirect to: example.com/taxonomy/type1/?type=type2 (you can make this query string whatever you want, but the gist is, redirect to a query string version of the “type1” permalink). You should be able to code this to a post status hook – whenever a post status changes to ‘publish’, if the post type is ‘type1’, add a wp_redirect from the URL structure you want people to type in to the query string version.
- Make the “type1” template conditional. Use an if statement: if there is a $_GET request where type=type2, show the type2 content; else, show the type1 content.
Related Posts:
- Remove slug from custom post type post URLs
- Theme localization of “slugs” (custom post types, taxonomies)
- How do I get a post (page or CPT) ID from a title or slug?
- How to get custom post type label and singular label from its slug?
- custom slug for custom post type
- Disable permalink on custom post type
- Get list of all registered post types slugs
- Using Custom Fields in Custom Post Type URL
- Change slug of registered custom post type in child theme
- 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 achieve this permalink -> category-name/custom-post-type-name/post-name
- Prepend meta_value to permalink of post
- Reslug a Custom Post Type
- Removing CPT slug from URL results in 404 error for archive page
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- Getting Post ID from slug during init
- Remove taxonomy slug when not assigning taxonomy with custom post types
- Custom post type’s slug gets wrong when adding a custom meta box
- Can’t edit Custom Post Type slug/permalink
- Custom Permalink with Dynamic Taxonomy for Custom Post Type – Works, but breaks other permalinks
- Custom Taxonomy breaking pages permalinks
- Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure
- Custom post type with slug for plural (archive) and for single
- Rewrite rules for custom post type slug
- Automaticly add slug to posts
- Make slug as ID Number for custom post types
- How do I fix permalinks for custom post types that has the same slug as a page?
- Custom post type and taxonomy slug issue
- Custom post types archive redirect
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Why does wordpress keep adding postname to my CPT’s permalink in the end?
- Remove post type slug of all post types from permalinks
- CPT custom archive template does not get loaded
- Am I using the flush_rewrite_rules function in the right place?
- Is there a way to have custom post type and page with the same slug?
- Change custom post type slug from plugin options
- Rewrite post type slug only for child theme
- Child post with numeric only slug keeps redirecting to parent
- How to add a post slug to a url?
- Adding Post id to the end of slug in a Custom Post Type
- Permalink for a custom post type isn’t working and I don’t know why
- Custom rewrite url category
- 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
- Allow duplicate slugs for custom post type with taxonomies
- Nested Custom Post Type or Custom Post Type Parents?
- Programmatically rewriting slug through functions.php but returns 404
- How to prevent a CPT’s slug and page slug from conflicting with each other?
- Custom Post Slug same as Parents Category Slug
- Multiple (two) category postings on the same page.
- Can slugs from posts and custom post types conflict?
- Custom Post Type archive-{post-type}.php not working
- Custom post type single page (single-{CPT-name}) 404 when slug includes hyphens
- How do you create %post_type%/%postname%/ permalink structure?
- Slug for custom post type
- Slug Confusion Between Post and Custom Post types?
- Different slug taxonomy for two different CPT
- Using page slug in wp_query
- How to get postname in custom page?
- Listing all slugs?
- Changing slug of all posts
- WordPress Custom Post Type – Rewrite Query
- Apply template by path/slug related to custom post type?
- Changing CPT slug and taxonomy already registered in parent theme
- Custom Post Type for Shortcode Use – Prevent it display as a post (with slug)
- Custom Post Types and Removing Slugs – should we do it?
- Need to return a string as permalink insted of str_replace
- Under What Conditions Can I name my CPT the same as my CPT Page?
- Custom post type and multi taxonomies + customize url
- Custom Post type dont use custom page template (slug is not right)
- Use custom post type taxonomy between cpt slug and name
- Show code dependant on CPT & category
- Remove custom taxonamy slug with pagination
- How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?
- Change permalink incrementor into pseudo-subdirectory
- Custom Post Type duplicating slug for new posts
- WordPress page not showing up – replaced with last 10 posts?
- WP gives 404 error for custom post type with GET variable
- Display a Custom Post Type within another with hierarchically slug
- 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
- Add category slug as class attribute in a link array
- Costum post type with costum (sub)taxonomy
- Remove Custom Taxonomy Slug only without removing Custom post type slug in permalinks
- Category slug not showing for Custom Post Type
- Can’t make permalink of CPT work
- Custom Post Type Rewrite Rule
- How can I retrieve the slug for a custom post type via name?
- WP Query WordPress Post Type with the same Taxonomy name
- Custom Post Type Slug / Page Slug Conflict – Prevent use of reserved slug on page save?
- Ideal top-level slug methods
- is this a bug or not?
- Create page using same slug as custom post type
- Hide custom post type slug url from search engine [closed]
- Same slug for Custom Taxonomy archive and CPT archive – Rewrite rule not working
- Custom post type Premalinks main page and details page
- Is it possible to use a post name in a custom post slug?
- How to change permalink structure off default posts and also CPT’s posts
- Custom Post Type slug has the same Redirection entry