Well it’s a long-time for me to comeback after many busy works at my company :), so, in this post I wanna to show you how to create a sitemap page for your WordPress blog without any additional plugin. If your web blog doesn’t have this page, lets try this simple tip with me.
First, why should your website have a sitemap page?
As a blogger, I think all of you are know about the importance of the sitemap page and therefore: the Google XML Sitemaps plugin for WordPress was downloaded 4,385,535 times (according to WordPress.org figure), of course I don’t want to talk about it again but most of bloggers aren’t create a sitemap page for their visitor and it’s a big missing! An XML sitemaps will help the SE index your website more easily but your website visitors almost never view that page and they need a page to scan all of your blog posts. (In addition, this page will help to increase the inbound linking for your site)
A Sitemap page demo
A demo of sitemap pages you should check out at: http://www.intenseblog.com/sitemap
And how to make it?
There’s just a few simple step:
1/ Locate to your WordPress theme folder and make a copy of the page.php file, rename the new one is sitemap.php.
2/ Edit sitemap.php file:
Replace
<?php the_content(); ?>
with:
<h3>Pages</h3>
<ul><?php wp_list_pages("title_li=" ); ?></ul>
<h3>Feeds</h3>
<ul>
<li><a title="Full content" href="feed:<?php bloginfo('rss2_url'); ?>">Main RSS</a></li>
<li><a title="Comment Feed" href="feed:<?php bloginfo('comments_rss2_url'); ?>">Comment Feed</a></li>
</ul>
<h3>Categories</h3>
<ul><?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0&feed=RSS'); ?></ul>
<h3>All Blog Posts:</h3>
<ul><?php $archive_query = new WP_Query('showposts=1000&cat=-8');
while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
(<?php comments_number('0', '1', '%'); ?>)
</li>
<?php endwhile; ?>
</ul>
<h3>Archives</h3>
<ul>
<?php wp_get_archives(‘type=monthly&show_post_count=true’); ?>
</ul>
3/ Add the following code on top of sitemap.php file:
<?php
/*
Template Name: Sitemap
*/
?>
4/ Login to your WordPress admin panel, create a new page with any Page title as you want.

In the Page Attributes box, choose sitemap template and then publish this page. It’s done!








Very simple and easy written, thanks for the share i have created the sitemap for my blog now.
Fahad last post: iOS 41 comes with Field Test Mode inorder to check your iPhone reception issue
I have been using a plugin which does this job. Thanks for the code though :)
Thanks for share…:)
Congratulations on a great blog. Now bookmarked, following on Twitter too!
I agree with you. Not all bloggers uses site map. I’ve seen so many blogs that only use category listing and archive listing for their blogs so that their readers can locate their posts easily. But not as easy as having a site map added into your site.
Mike Ramsey last post: Tips On How To Stop Excessive Sweating
Hmm, I started to follow your directions and created a page first. I wanted to see what templates were in there.. To my amazement, there was a Site Map template in the drop down already. I wonder if that is new for WordPress 3x or if I once installed a plugin then removed it when I could not figure out how to use it? haha. No idea how it got in there.. But selected it and my sitemap was up and running within seconds.
Nice to hear about that :)
No, actually some themes already have sitemap page built in it.
It depends on the developer, and it doesnt matter whether the theme is a free theme or the premium one.
Affan Ruslan last post: Beza Air Liur dan Air Liur Basi
Thank you so much for the simple instructions on how to make a sitemap in wordpress! I had already created my xml sitemap but I wanted to create one for my users to find stuff quickly. I know that when I am on a site that looks like it has a lot of pages I am either going straight to the search bar or the sitemap. :) Thanks again and please keep up the great work!
Brian O. last post: Goal Based Saving With SmartyPigcom
Thank you so much for the great information!
thanks…. i make a sitemap for my blog…
Although there a lot of plugins that automatically does this job for us, I would definitely still go for this one.
Nice Tutorial Jennifer :D
Sitemap is a very important thing in a blog. Like what other bloggers keep on telling, search engines love it, Google absolutely love those blogs with sitemap. It’s great that you remind it to us.
Aaron Fuller last post: Reverse Phone Number Lookup
Jennifer, i already had a plugin doing this job, But which one do u prefer? Creating it manually or letting the plugin do the job? Please advice
James
James Fulton last post: Deramaxx For Dogs Review
I think you should do all of them, one for SE, and one for human visitor.
I like the looks of this particular WordPress Sitemap. Looks very simple to implement. Thanks for sharing this tutorial.
Jake last post: How To Find a Temp Job
Thanks for sharing this. Quite useful.
Thanks a lot Jennifer! This really helped me !
-Abhi
Nice, handy reference. Saved me some time. Much appreciated!
Hi Jeniffer. Thanks a lot for the tuts. It works like a charm on my site. I just want to know, why the status of my sitemap on Google webmaster is X but there is url been index?? Do you know what’s the problem?
Just waiting for Google index all of your pages :D
Thanks for the amazing tutorial. It is so easy to create a sitemap.
Thanks Jeniffer for sharing what you know here. I did created my sitemap once and not really into the right place. I will do over with your tutorial…
nice tips i must use on my word press blog
anuj last post: How To Install New WordPress Blog On Hostgator WebHosting
awesome code … :)
i thought that the writer is a boy..he3
but its a beautiful girl..:)
thank you for this lesson. I had a problem. I make a site map but my site map dont show my last posts. how I can solve it…
The procedure is easy to follow and most important – works. Thank you very much for sharing this useful procedure.
YK Tee last post: Taiwan Tourism Promotion in Singapore
I always had used plugins which automatically update itself. You can also set the priority for deep links. I also recommend using a xml sitemap creator for the archives section of your site.
Wow,,, good. Its helpful for me..
nice information and good tutorials .. thanks for the article mate …
Nice tutorial. I was just creating a site map page and didn’t even think about adding the feeds in here. Nicely done ;)
Thanks… I Have Succesfuly Installed This Trick To My Themes
Hi. Thank you for this… so simple. I do have one small issue that I’m hoping you can help me with. When I go to my blog and click on “Sitemap,” the sitemap comes up very nicely just like you have here on your site. However, if I click on a menu (category) on my horizontal menu bar, I get a 404 page. Though I can click on my blog’s home page or any menus with an external link and be taken to the appropriate place. It’s just the menu links for my internal categories that is having the issue. However, if I go to the Home page on my blog and then click the menu links, I am taken to where I should be. The only time I have an issue is within the Sitemap page. Yet again, I can click on the same category links in my sidebar, and I am taken to the appropriate place. I don’t want my readers coming in and getting frustrated if they decide to click on a menu link rather than a link given by the sitemap. I’m sure it’s just a small piece of coding that can fix this. Can you please help me?
Hi Abby, could you tell me how do you show the category list on your menu bar?
Hey, thanks for being there for me tonight…I really needed some help on my Sitemap, because I don’t have one. My buddy said I needed one so I Google and got your find answer. However, I don’t know how to use code at all right now, so I’m doing more homework to get that sitemap up on my page.t
Thanks!
RKellyLee
Been looking all day and then some for EXACTLY what your blog did for me. THANK YOU!!!!!!!
Now…if you had a High Slide trick or two you could pass along. :)
Thanks again, Mike
Thanks Jennifer. Very well explained. I will make a sitemap for my blog.
Thank you thank you thank you! I’ve tested a bunch of XML sitemap generators, fine for the search engines, but found none that worked as well as for site visitors. Thank you. Now visitors can see all blog posts and I don’t need to keep manually editing an html sitemap each time I add new posts (or worse, when i change or edit themes). This keeps track of posts et al for me.
Thanks!
Andre
Dear Jenni,
Thanks for your tips. I will make one for my site now. :)
Thanks for the tutorial. It was just what I needed
I have wordpress installed on a subdirectory of my website, so it’s at www . mysite . com / blog and it works great. I have a sitemap fr my main website which I update manually, but am not sure what to about the sitemap for my wordpress blog because of how it’s set up. Do I just add the blog posts to my main sitemap like my other website pages, or shold install a sitemap plug in? I’m confusd as to what would be a better move SEO-wise…
Hi Dan, as what you say, I assume that your main website is not powered by WordPress. I think it’s necessary that there’s only 1 sitemap page for a website therefore, you need to add the blog posts to my main sitemap.
Hey Jenni, thanks for this tutorial.
You could also add a list of authors to this template, would be useful if it’s a multi author blog.
Hello
It’s quite useful code. Now, can you pls explain to add ‘sub-categories’ under ‘main-categories’ and to add ‘author’ list in sitemap.
Thanks.
Hi Ashish, as I noticed that the wp_list_cats() function has been deprecated and be replaced with wp_list_categories() http://codex.wordpress.org/Template_Tags/wp_list_categories
You can view that page and change the “depth” to 0, it would show all categories and their sub-categories.
About the author list, you can use this function wp_list_authors() http://codex.wordpress.org/Template_Tags/wp_list_authors
Thank you very much for the simple and very helpful information! No plug-in needed :) hurray!
hi Jenni,
I use your code on my site http://www.designersbrush.com/sitemap it was working fine but now i am getting error message-
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 64 bytes) in /home2/fabricd3/public_html/designersbrush/wp-includes/meta.php on line 339
Any idea what is wrong with it, thanks for your help.
As this error I think this’s a problem with your host so you can contact them about it, maybe it allows too few memory for your site.
Thanks a lot, very good link.
I used that plugin. Google XML Sitemaps. it is useful. thanks.
Thanks a lot – this helped!
Very nice and useful info.. I got site map huppp!!!!
Hi! This is a Nice Tutorial. I make it simple to understand. I will apply with my own blog this one.
thank you for share
Pencil Drawing last post: Waterfall the exotic creature
Thanks Jenni, it’s really helpful post but why do we need to create a separate XML Sitemap Page? I know you gave the answer above but what I am asking is you can submit your sitemap without creating a page right? So why it’s necessary to create new page just for sitemap?
dan last post: Gardens of Babylon Finial
Great post but I still think plugins are the easy way nowdays to make sitemaps and other stuff.
Thanks you for sharing information, I find it helpful by this article to create a sitemap in WordPress an easier without must using a plugin that overload the server’s performance.
Really nice tips and alot of thanks for that JENNIR!
i really like your idea of putting categories, blog posts, archives, pages and number of post per category in a single page but how can i show only categories on a page for ex. lets say i have a celebrity blog now i want a page which have Celebrities as heading than alphabet “A” and under this all the celebrities staring with the alphabet “a” and so on.
Currently, I don’t have any idea for this one.
thanks for sharing this! quite useful. :D
i cant found
in my site.phpHey, thank you for this nice sitemap. I use multisite on my wordpress and this helps me a lot. But my site have posts about 2000 so it will not cause any problem right? like taking too much time for loading sitemap???
Good article, thanks for sharing
Soumya Vinod last post: Loading XML in Flash AS3
Google Sitemap Generator Plugin makes my WordPress Sitemap as so simple :P
Thanks for the easy to follow instructions. Others I have read online were not as easy to follow.
Adam last post: Premimum .Pro Auction Ends Tomorrow
Nice informative blog, thanks for sharing.
very nice tips for me
thanks to share with us ;)
Thanks Jenny. I’ve been looking for this simple sitemap code. Now my theme officially has a sitemap page :)
Thanks for sharing.You make some very informative points. Keep up the great work!
A good sitemap helps your visitors find faster and easier what they’re searching for and, at the same time, allows the search engines to crawl your website faster. As for the HTML map, take care to check it before uploading it. The generator creates the map following the crawling instructions you give the search spiders in your robot.txt file. “Rebuild sitemap if you change the content of your blog” is checked so that it updates automatically.
what is its difference with the existing plugin ?
Hi .. first of all , I want to give thanks for this useful post . A sitemap is the thing that works behind the webpages to get indexed in search engines .Previously , I used to use Google XML Sitemap Generator Plugins for WordPress .but after some time I got problem from it .However , it stopped responding for me and don’t know why it did so . after that , I tried to create sitemap manually . But it was not only boring but also laborious job for me . So I tried to submit my RSS feed as my sitemap in web masters tool in Google. But there is a problem with the old blog pages because they are not properly indexed . However , I tried a xml sitemap generator for my site ..even I wrote an article about it .. here is the link .. any one can check it too .. “http://bit.ly/wwlgij ” …Thnx again ..:)
Som last post: Som wrote a new blog post: Why Photo Journalists Prefer Canon PowerShot SX40HS Digital Camera : A Review
Thanks!! very useful and nice triks.. :D
Thank you so much and this helped to develop my site map.
Simple but intructive…How i wish i could migrate soon from blogger to wordpress..thanks for the info…honestly, i’ll keep on exploring about wordpress for quite sometime now…
I made a site map for my blog using this method, But once I tried to submit it to Google webmaster tools it says, the site map is in HTML form and not supported by Google. Is there any solution for this??
Sajith last post: How to monetize your blog as an affiliate
This type of sitemap is not for Google Webmaster submitting, it’s only for your “real” visitors.
Firstly, I wanna thank you for this helpful post you’ve made. I’m currently searching on how to create a sitemap for my site then I stumbled upon in your blog, this is a great yet simple but effective. Thank you for this. :)
Lisa McRain last post: African Mango Reviewers Say No Miracle Supplement
Thank you so much and this help me to develop my site map successfully to my website.
Salim Sazzad last post: Odesk Bank Wire Transfer in Bangladesh | Get Money Directly in Bank
We have been using Dagon Design Sitemap Generator for years… Definitely like your organization better. Great write up! Will be implementing soon.
Brian Jackson last post: Xbox Music Can’t Sign In with Error Code 0xc00d11cd (0×80004001)