[wp-trac] [WordPress Trac] #63929: WordPress sitemap not indexing correctly when custom post types are used
WordPress Trac
noreply at wordpress.org
Mon Sep 15 11:14:01 UTC 2025
#63929: WordPress sitemap not indexing correctly when custom post types are used
-------------------------------+------------------------------
Reporter: abbuabbu | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by gautam23):
* keywords: => reporter-feedback
Comment:
== Reproduction Report
=== Description
This report validates whether the issue can be reproduced. Since the only
current officially supported version is the last major release of
WordPress, I tested it on trunk.
=== Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.5
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 140.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.3
- MU Plugins: None activated
- Plugins:
* Simple CPT 1.1.0
* Test Reports 1.2.0
* WP Dummy Content Generator 4.0.0
=== Actual Results
1. ❌ Error condition does not occur (not-reproduced).
I can see the CPT and its posts in the sitemap.
=== Additional Notes
- Verified custom post type registration arguments (public, has_archive,
show_in_rest) in relation to sitemap inclusion.
- Debugged WP_Sitemaps_Posts::get_object_subtypes to see why CPT is being
excluded.
- Tested permalink‑rewrite flush to ensure CPT routing correct for sitemap
- Reviewed hooks/filters (e.g. wp_sitemaps_posts_query_args) for
unintended exclusion of CPT posts
- Checked sitemap pagination logic to see if missing posts fall into pages
not being generated properly.
- Test multiple CPT configurations: with and without archive,
hierarchical, REST support, etc., verifying sitemap inclusion..
All in all, **make sure that the `public` argument is true** while you
register the custom pot-type.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63929#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list