The staple technique to debug an unwanted redirect is to interrupt it in process and dump a call stack of where it’s initiated from.
Outside of just doing it by hand by troubleshooting WP core’s redirect functions, there are some ready made solutions. Better HTTP Redirects is one plugin I’ve used on multiple occasions for it, it has debug mode that will do just that.
Related Posts:
- Pagination not working with custom loop
- Resolve a custom post type name vs. page permalink conflict (same slug)
- Get the ID of the latest post
- Custom post type yearly/ monthly archive permalinks
- Sort custom post type list table by display name of a user id stored as post meta value
- How to use a custom post type as front page?
- Random post, once per day
- get attachments for all posts of particular post type
- Query custom post type by custom field
- WordPress Custom Post Type is Matching on Partial Slug
- Add Custom Post Type to Current Query
- Custom Queries: Joining On Meta Values From Two Custom Post Types
- SQL to update custom post taxonomies
- How do I redirect all 404 errors of a specific post type to another URL?
- Query multiple taxonomy in Custom Post Type
- Querying Posts by Taxonomy From Alternate Network Site
- Custom Search | Wrong output & question
- Get the most popular terms for a custom post type
- Query by 2 values of a repeater ACF field
- show posts only on homepage but using custom post type and taxonomy for query posts via url
- How can I fix a slow redirect after form submit from frontend (no plugin)?
- Comparing timestamps in meta query doesn’t work
- Display two post types ordered by two custom fields
- WP insert post PHP function dynamically generated Custom Fields
- Include both default and Custom Post Type in query modified inside pre_get_posts
- Custom Post Types Not acknowledged for date.php template
- Query posts between two dates (custom meta keys) CMB2
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Include different loop templates in search query
- Adding posts of custom type into the main feed
- Bulk 301 redirect for custom post type
- Custom Post Types, Page Templates and Pagination. Why do I get a 404 Error?
- Inserting data into `post meta` table?
- Custom Select Query with Custom Post Types
- How to redirect all pages of a custom post type [duplicate]
- Redirect to post with only post ID in the URL vs post_type/post ID
- How to override post-new.php with custom template
- Posts show up under “published” but not “all”
- Custom 404 redirect for a luddite
- Redirect users in first login to a dynamic link
- How do I display specific custom posts, and how do I edit a post’s singular page?
- pagination for a custom query
- Redirect sub-page URLs to parent without changing URL
- Get posts of an specific term of a custom taxonomy
- Show first posts with custom field not empty and order all by title
- Conditional posts in WP_query for search
- How to develop custom URL redirection
- Display year value before a set of posts
- Help ordering custom query by Title, Ascending
- How to add parameters for custom post type
- Query Pulling the same post twice
- Is it possible to add query parameters on the archive page?
- meta query always fails even if data is correct
- How do I get a nested query to only display content that the main query outputed
- $post breaking container loop
- Redirect Custom Post Type after user submits update
- Redirection error after posting a comment on a custom type post
- Redirect preview single post link to a page
- Redirect permalinks after creating custom post types
- Pagination in custom loop for custom post type throwing 404 error
- Query Only Show Text on Posts With Certain Taxonomy Tag
- 404 for children in hierarchical custom post type
- Multiple Queries and Loops within CPT Archive
- Query child posts on parents single.php?
- Query Posts From Multiple Post Types
- Pagination not working with custom loop
- how to limit query_post to first page?
- Filter CPT based on meta box value using Flexible Posts widget?
- WordPress can only query up to 766
- How would I get a list of posts from a custom post type
- URL Redirection From Custom Type to Posts
- Pagination not working with custom loop
- Pagination not working with custom loop
- Post content stays the same but permalink changes ?
- Pagination not working with custom loop
- Retrieve post data via WPDB class
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- Listing custom post type items from a couple of custom taxonomies
- Pagination not working with custom loop
- Show custom posts with a specific “custom TAXONOMY slug” on startpage
- How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?
- Allow admin to determine the order of queries?
- WordPress search results
- Posts 2 Posts: query connected — orderby problem
- Code in custom widget queries all posts, when it should only query the current post
- custom post-type query just returns two posts
- Order custom post type is beign ignored
- How to add post type in masonry posts elementory widget
- Filter Custom post type by another Custom post type
- Create a list of months based posts
- WordPress Admin Page Slow. Customer Post Type is the slowest
- Add a class to a menu item depending on a body class
- Get Posts ordered by a date custom meta field
- Display all child posts in a custom post type, grouped by a custom taxonomy site
- Load posts via AJAX without draft status
- How can I show a field ID in Elementor with Request Parameter
- Custom Post Type slug has the same Redirection entry
- Query Multiple Post Types and Paginate Newly Created List
- Right Permalink for Custom Post Type with number slug
- How to create alias / synonym links to existing posts