ppq
Sophomore
Just Getting Started
Member Likes (0)
Hi, love the simple sitemaps plugin. I think that's a great name because it's got to be one of the best and simplest plugins for sitemaps out there. Only one problem.
I've noticed that custom post types aren't displaying in the sitemap. Is there a way I can fix this? I'm using the premise plugin landing pages (custom post type is landing_page) and they don't show in the sitemap.
I started to dig into the code myself but if it takes me more than an hour to figure out, I know you guys give such good support I decided I would just ask :)

Responses (6)
Member (joined April 2009) Likes (0)
Hiya @ppq,
I don't know of anything that would limit it only to posts. It does one search for pages and then a regular get_posts call. Let me ask the developer about this one to be sure though.
Thanks!
Member (joined September 2011) Likes (0)
Hey, so here is the code from line 102 to 130 or so. It only calls for post_type page and regular posts. I don't think it's calling for any other post types. Am I reading this code right?:
Member (joined September 2011) Likes (0)
Sorry, that code is from simple-sitemaps.php. I forgot to mention that above.
Developer (joined April 2011) Likes (0)
Hi,
Indeed, you're reading the code right, the plugin only checks posts and pages at the moment. This is a good point for a future release, but in the meanwhile you can pretty much add support for custom post types right away by duplicating the pages call (together with the "foreach..." markup generation part), just substituting your custom post type for pages.
Member (joined October 2010) Likes (0)
Why not add a filter to the $content at line 130 so we all can add custom content in the sitemap
Member (joined April 2009) Likes (0)
Hiya,
Just noting we updated this plugin a bit earlier today, here's the notes from the changelog:
- Exposing totals, posts and pages counts for modification.
- Adding file path replacement hook.
- Adding filter and define switch for sitemap caching.
Thanks!
Become a member