How to create sitemap in wordpress

Create wordpress sitemaps in three easy steps.  More details about are as follows.

Step 1: Locate to your WordPress current theme folder and make a copy of the page.php file, rename the new one is sitemap.php.

Step 2:  Edit sitemap.php file and replace with following code and save the file.

<h3>Site Map</h3>
<h3>Feeds</h3>
<ul>
<ul>
<li><a title="Full content" href="feed:<?php bloginfo('rss2_url'); ?>">Main RSS</a></li>
</ul>
</ul>
&nbsp;
<ul>
<li><a title="Comment Feed" href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comment Feed</a></li>
</ul>
&nbsp;
&nbsp;
&nbsp;
<h3>Categories</h3>
&nbsp;
<h3>All Blog Posts:</h3>
<ul>
<ul>
<ul>have_posts()) : $archive_query-&gt;the_post(); ?&gt;
<li>()</li>
</ul>
</ul>
</ul>
&nbsp;
<h3>Archives</h3>

Step 3: Add sitemap link to the header/ footer, Site map is  ready.

Share this nice post:

6 thoughts on “How to create sitemap in wordpress

Comments are closed.