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, Problem

Sitemap Question

I saw this thread http://forum.grabaperch.com/forum/08-05-2014-simple-sitemap-that-includes-blog-posts-and-list-and-detail-pages and the answer as well as http://solutions.grabaperch.com/html-and-css/how-do-i-create-a-google-sitemap

Should these be separate calls or could you place the call in the site map template inside the one for the general site e.g.

<url>
<loc>http://myurl.com<perch:blog id="postURL" /></loc>
<loc>http://myurl.com<perch:pages id="pagePath" /></loc>
</url>

And if the url for the blog is http://myurl.com/blog does the above work for this?

Nigel Coath

Nigel Coath 1 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

I'm sorry I don't understand the question.

What do you mean by call?

Ignore the term not sure what to "call" it. Basically can I place both above urls inside one template or do there have to be essentially two separate xml files?

I mean the link inside the <loc>

Rachel Andrew

Rachel Andrew 394 points
Perch Support

No you need to do the pages, then the blog. Two PHP functions in the page and two templates. Not two xml files, just one then the other in the same file.

Okay thats what I thought, what about the path to blog, if its http://myurl.com/blog

is it:

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

or

<loc>http://myurl.com<perch:blog id="postURL" /></loc>
Rachel Andrew

Rachel Andrew 394 points
Perch Support

It should be:

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

However you can just try it and see. It won't cause any problems.

Okay thanks will do.