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
- Sort custom post type list table by display name of a user id stored as post meta value
- get attachments for all posts of particular post type
- Custom Queries: Joining On Meta Values From Two Custom Post Types
- How do I redirect all 404 errors of a specific post type to another URL?
- Querying Posts by Taxonomy From Alternate Network Site
- Get the most popular terms for a custom post type
- Query posts between two dates (custom meta keys) CMB2
- Include different loop templates in search query
- Adding posts of custom type into the main feed
- Custom Select Query with Custom Post Types
- WP_Query search posts by custom post type and custom taxonomy
- Calculating Bayesian average for custom post type
- How to set up htaccess to redirect a particular post type or subdirectory to HTTPS?
- Is it possible to create a shortcode that will query a post based on taxonomies?
- Redirecting when changing custom post type slugs?
- Selecting New & Edit Page for Custom Post Types
- How to filter custom taxonomy categories on archive?
- Modifying date filter on admin page for custom post type to link to custom field
- How to debug a blank page?
- query posts and custom post type with meta key
- WordPress Orderby Numeric Value Not Working
- Query string parameters from custom fields, inconsistent results
- Add post_type to index.php
- Custom Taxonomy Permalinks Redirection
- Order By Post Type ThenBy Taxonomy
- Custom query to filter posts that have current post as a taxonomy [closed]
- Making certain categories of CPT not publicly queryable
- Querying both pages and posts
- Meta query for custom post type ignored in main query
- Querying Two Custom Post Types with OR Not Working
- How do I move/order posts with a tag to the end?
- redirect automatic page that serves custom posttype content
- Specific query for custom post type
- Display post content with respect to its title?
- First custom field value (out of several) displayed twice after query
- Prioritize posts in query by meta keys?
- WP_Query orderby and tax_query
- Different Ways to Query Custom Post Types?
- Changed permalink structure of CPT – should I redirect?
- Number of posts in the archive
- show all custom posts types in home page
- Query custom post type based on post id and custom field value
- Make (custom) post type accessible only by custom query
- Graphql: Unable to query (where:{author}) for custom post type
- Custom Query: If One Post Object Field Value Is The Same As Another
- rewriterule not working
- Hide text if query has no posts
- How do I get the index for a custom post?
- Getting custom post types to properly display alphabetically
- Create query for both custom post type and category
- Filtering custom posts by custom fields (ACF) [closed]
- Custom taxonomy query showing more than 4 posts
- All in one calendar custom post type query doesnt work as expected
- redirect after submiting post for review
- How to divide Subcategories into pages of parent category wordpress
- Query filter by value in meta_value array
- Change search query in wordpress custom post type
- WP Query: If field X is empty, show posts based on field Y
- Faking “Same Slug Root, Multiple Custom Post Types” with Redirects?
- Issues with static pages redirecting towards home.php
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Does this archive template part look like its making too many calls to the db?
- Shortcode with loop stacks output
- Displaying all posts by category and showing content on click
- Meta query and compare “!=” not working as expected
- How select query is generated in a Custom Post Type?
- Post Click Redirect to Custom URL instead of Single Post Page
- Custom post type order by post_title
- How to hide sub fields in a field group and also the entire field group if the answer selected is “no”
- Custom Post Type canonical link / pagination redirecting to root
- Linking posts together with Advanced Custom Fields “both ways”
- How to override post-new.php with custom template
- Redirect users in first login to a dynamic link
- Show first posts with custom field not empty and order all by title
- Help ordering custom query by Title, Ascending
- How to add parameters for custom post type
- Is it possible to add query parameters on the archive page?
- Redirect preview single post link to a page
- Redirect permalinks after creating custom post types
- Query Only Show Text on Posts With Certain Taxonomy Tag
- 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?
- WordPress can only query up to 766
- URL Redirection From Custom Type to Posts
- Pagination not working with custom loop
- Retrieve post data via WPDB class
- 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
- Allow admin to determine the order of queries?
- Posts 2 Posts: query connected — orderby problem
- Code in custom widget queries all posts, when it should only query the current post
- How to add post type in masonry posts elementory widget
- Get Posts ordered by a date custom meta field
- How can I show a field ID in Elementor with Request Parameter