Thanks to Tom, I understood how this works…
- I did not have any pages with the URL
/shows-events/
so there is nowhere to redirect to - When the user accesses the existing page
/event/
, it triggers a redirect to/shows-events/
(which does not exist), but because of WordPress’ canonical redirect, it returns to the existing URL/event/
, which then causes an infinite loop
To resolve this, you may either:
- Remove the redirection entry
- or change your CPT slug
- or create a page with your target redirect URL
A useful tool when tracking URL redirects: https://wheregoes.com/
Related Posts:
- Child post with numeric only slug keeps redirecting to parent
- Can slugs from posts and custom post types conflict?
- Right Permalink for Custom Post Type with number slug
- Redirect custom post type category to other custom post type category
- 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.
- Removed custom post type slug but not working for child pages
- Including taxonomy term before post type breaks top level pages
- Custom Post Type – Duplicate Page Slugs
- Some posts from custom post type to subdomains
- Remove permalink for custom post type
- Auto Slug Generation for Custom Post type
- How to make a posttype show under a page hierarchy (example.com/page/posttype/entry)?
- 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?
- Changed permalink structure of CPT – should I redirect?
- Slug for custom post type
- Rename a slug label
- Custom URL redirect in WP
- Slug Confusion Between Post and Custom Post types?
- How to find a specific post_type using its “rewrite slug”?
- Different slug taxonomy for two different CPT
- How to add current custom taxonomy slug to body class
- Change Slug of a Custom Post Type
- Redirect to archive is single post has a certain term assigned to it?
- Using page slug in wp_query
- How can Custom Post Type and a page have the same slug?
- Custom Meta Box Causing Error: “Are you sure you want to do this? Please try again.”
- Redirect to first child on Custom Post Type (without template)
- How to get postname in custom page?
- Listing all slugs?
- Why WordPress is picking archive.php instead of page.php?
- Changing slug of all posts
- WordPress Custom Post Type – Rewrite Query
- WordPress different templates for same type custom post (but different slug)
- Query not work for current taxonomy
- Create short URL with auto 301 redirect
- Check if user has custom post published redirection on WordPress
- Custom Post Type Advanced Slug
- Automatically update slug with latest title within custom post type [duplicate]
- Custom Post Type archive redirects to home
- Apply template by path/slug related to custom post type?
- Changing CPT slug and taxonomy already registered in parent theme
- Custom Post Type to replace Woocommerce products – page not found error
- Custom Post Type for Shortcode Use – Prevent it display as a post (with slug)
- rewriterule not working
- How to use a specific custom field in a custom post type as slug
- Custom Post Types and Removing Slugs – should we do it?
- sort by name (slug) custom post type
- Need to return a string as permalink insted of str_replace
- Custom Post Type and Breadcrumbs Conflict
- How to controll the Posts post type and general wondering about WP data structure
- Under What Conditions Can I name my CPT the same as my CPT Page?
- Custom Post Type Causes Error: Warning: call_user_func_array()
- How to change CPT single post slug
- Custom taxonomy permalink without term, redirection to CPT slug
- redirect after submiting post for review
- How do I set a post slug automatically based on taxonomy?
- Custom post type and multi taxonomies + customize url
- Custom Post type dont use custom page template (slug is not right)
- How best to structure multiple CPTs and tax within a ‘resources’ section
- Custom rewrite rule based on other custom post type title
- Redirect Existing Post to CPT
- Use custom post type taxonomy between cpt slug and name
- Faking “Same Slug Root, Multiple Custom Post Types” with Redirects?
- Issues with static pages redirecting towards home.php
- Show code dependant on CPT & category
- I have a random letter appearing before my content. Where to start looking for the cause?
- Difference between a default post type and a custom post type?
- 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)?
- Post Click Redirect to Custom URL instead of Single Post Page
- Custom Post Type not using correct page template
- WordPress doesn’t respect Page slug in custom post type url pagination. Keeps getting removed
- Add %post_id% to slug of custom post type and prevent the “unique slug” thing that WP does?
- “A post type mismatch has been detected” Error when updating custom post
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- Output all terms slugs for a loop filter
- Custom Function to redirect singular post if specific meta field is empty
- Custom Post Type canonical link / pagination redirecting to root
- Change permalink incrementor into pseudo-subdirectory
- add .html to custom post type with WPML
- How to redirect custom post type posts to one url with htaccess?
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Custom Post Type duplicating slug for new posts
- How to override post-new.php with custom template
- Custom post type post_type_link gives “page not found” on any other custom post type
- Custom 404 redirect for a luddite
- Two CPT: one is using part of the custom rewrite slug from the other
- WordPress page not showing up – replaced with last 10 posts?
- Redirect users in first login to a dynamic link
- Custom permalink rewrite rules – how do I fix this?
- WP gives 404 error for custom post type with GET variable
- Custom taxonomy archive slug overwrites static page
- Slugs on hierarchical taxonomies
- Error [Column ‘post_title’ cannot be null] when title is disabled for Custom post type
- Display a Custom Post Type within another with hierarchically slug
- Redirect sub-page URLs to parent without changing URL