We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Question

Simple Sitemap that includes blog posts and list and detail pages

The Sitemap solution http://solutions.grabaperch.com/html-and-css/how-do-i-create-a-google-sitemap is helpful to a point, but it would be very useful to have the solution also show how to include blog posts and list and detail pages in the sitemap, as many sites use those features in Perch.

Simon Clay

Simon Clay 127 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You can always add it and submit a pull request :)

Simon Clay

Simon Clay 127 points

Rachel, thank you for thinking that I'd be capable! Unfortunately, I'm not sure how to code that.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

For the blog posts it's as simple as using perch_blog_custom with a sitemap template. So, this in your sitemap.xml:

perch_blog_custom(array(
    'template' => 'google_sitemap.html',
));

Then a template as usual:

<url>
    <loc>http://grabaperch.com<perch:blog id="postURL" /></loc>
</url>