Learn Thesis Theme Fast to Build Unique and Beautiful Websites

  • Thesis Designer Guide is the fastest way to learn the Thesis framework.
  • A step-by-step guide walks you through all the essential things you need to know to become a Thesis design expert.
  • You don’t need to be a programmer to learn Thesis design.
  • The complete Thesis Designer Guide covers all the coding basics and tools needed to become a Thesis expert.

Learn Thesis Theme! Get Started Now!

How to Create Sitemap and Archives for a Blog with Thesis Theme

by in How To,Thesis Theme Customization,Thesis Theme Tutorials

In this video tutorial deals about how to create site-map and archives for your blog. Normally thesis theme offers thesis options and design options. Inside the thesis options we can choose our archives pages similar to home page, or only title or like teaser box or post excerpts. Which type we want we can select in the display options. But the number of posts appear in the single archive page is equal to the number of posts in homepage display.

In order to get all the posts of your blog in single page we need to create site map for your blog. The below video will explain how to create site-map for your blog contains categories, pages, archive by month and all the posts.

To create site-map, archive by categories and archive by month you should follow below steps.

Step 1:

First you should create a page in the name of site-map. Go to word press admin select ‘add new’ under pages tab and create site-map page. You can give your site-map to your visitors by placing it on navigation menu or in sidebar. So readers can easily find out your total site structure and which post they need.

Step 2:

Once you created the page, copy and paste the below code in custom_function.php file

/* SAVE THIS IN CUSTOM_FUNCTIONS.PHP FILE */
remove_action('thesis_hook_archives_template', 'thesis_archives_template');
add_action('thesis_hook_after_post', 'custom_sitemap');

/* SITEMAP AND ARCHIVES PAGES */
function custom_sitemap() {
if (is_page('204')) { ?>
<div>
<div class="sitemapl">
<h3>Pages:</h3>
<ul>
<?php wp_list_pages('title_li='); ?>
</ul>
<h3>By Month:</h3>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<h3>By Category:</h3>
<ul>
<?php wp_list_categories('sort_column=name&title_li='); ?>
</ul>
</div>
<div class="sitemapr">
<h3>Last 50 posts:</h3>
<ul>
<?php wp_get_archives('type=postbypost&limit=50'); ?>
</ul>
</div>
</div>
<?php } }

The above code you should replace the page id 204 with your site-map page id. Here I removed thesis archive template and added custom site-map.

Step 3:

In order to get page id, go to ‘pages’ in wordpress dash board. Under pages click edit option. Then hover the mouse cursor on site-map page. The site-map page id will display in status bar which shown in below image.

site-map page id

You can limit your number of post display. The above code I have used only last 50 posts. If you want you can use 100 or remove the limit 50 then it will display all the posts in your blog form the latest.

Step 4:

Now you can style your site-map page by using the below css code. Copy and paste it in custom.css file.

/* SAVE THIS IN CUSTOM.CSS FILE */
/* custom  sitemap and archives page */
.custom .sitemap h3 {margin-top: 0;}
.custom .sitemap ul {font-size: .85em; }
.custom .sitemapl { float: left; width: 30%;}
.custom .sitemapr { float: right; width: 70%;}

The above code I have used archive by categories, pages and posts font-size and location for the above you can place any where in the page by adjusting site-map. If you need only posts in site-map you can remove all others like page, categories and etc also use width as 100%. Once you created the site-map, your site-map looks like the below image.

Sitemap for a blog

Step 5:

Add site-map in navigation menu for this go to thesis options in wordpress admin. Select navigation menu and add the site-map page in menu. By drag and drop the site-map page you can place the position in navigation menu. Share your experience in comment section. For more checkout our all Thesis theme tutorials..

{ 55 comments… read them below or add one }

Sergio

Thank you Pascal, it works very nice!

Reply

Pascal

Glad it worked nice. :)

Reply

BestofBlogger

Thank you, Sitemap works at my blog also. You can check here: http://www.bestofblogger.net/sitemap/

Reply

Pascal

I saw your site. It’s working fine.

Reply

Suresh

hai vivek,

In your sitemap custom functions code change 'type=postbypost&limit=100' into 'type=postbypost&limit=' it will solve your problem.

Reply

Steve

I have a question…How can I create a page that lists all of my categories on a full page?

Reply

Suresh

hai,

The above post we have list of pages, monthly archive and categories within the div name called id=”sitemapl”..

If you need only categories remove others..

also in css code we have sitemapl width=30% make it as 100% to display categories in full page…

Reply

Games

It works nicely, thanks for your great and very easy tutorial. U can see my sitemap here http://freefullversiongames.in/sitemap

Thanks alot,

Reply

Pascal

Your Sitemap fits well in center of the page.

Thanks for making use of our tutorials. For more thesis tutorials, don’t forget to subscribe on our youtube channel http://www.youtube.com/fourblogger

Reply

Cliff

Thanks very much for this post. It has been informative and helpful. I now know how to add these to my site :-) .

Reply

Pascal

You are welcome, Cliff!

Reply

Farnoosh

I followed these instructions word for word and when I pasted your code below in my custom_functions.php, I got this error and it brought my whole site down:

Parse error: syntax error, unexpected ‘}’ in /home/fbahram/www.ProlificLiving.com/blog/wp-content/themes/thesis_16/custom/custom_functions.php on line 179

I don’t know any php. I did not see anything on line 179. There is no code after line 150ish. I replaced with a old customer functions.php but just an FYI.

Reply

Suresh

hai farnoosh,

check your custom functions code.. each function has open and close brace { }. I think one close brace is missing or extra brace in available in your custom function.php file .. check out this..

Reply

Farnoosh

Naturally that’s what I did… I will go through and check it again this weekend. I didn’t think I have to worry about anything other than pasting the code in…..Do I not do that at the very end of a perfectly working custom_functions.php? Where does the extra one pop in then? Thanks!

Reply

Suresh

hai,

add the code at the end of the custom functions.php file.. it will work fine..

Reply

Suresh

hai aviationMY,

Just change the page title in your wordpress admin… dont change the page URL.. If you changed the url webmaster shows the 404 not found error for previous url. so change only the title of the page…
sitemap tilte will automatically changed.

Reply

Suresh

hai,

I am not clearly getting what you are asking about.. tell me with details..
do you want to change the page url?
http://fourblogger/sitemap is the sitemap page url of fourblogger
or
do you want to change the page title The New world Map?
What you need instead of page title?.
note:
If you are using any slug plugin it may shorten your page url .
eg; domainname.com/the-new-world-map into domainname.com/world-map

Reply

Suresh

hai,

You can also change the page title and url in different words as you like..
but it’s good for SEO.
your page URL should be a particular word of page title or the whole part of page title..

Reply

elbenno

THANK YOU !!!

it works fine

http://www.astronautenbar.de/sitemap/

Reply

elbenno

Sorry! New Name, new Link:

http://www.astronautenbar.de/archiv/

Seems to have interferences with the sitemap.xml from the “Google XML Sitemaps” – Plugin by name.

Reply

Pascal

Your sitemap and archive page both are fine.

Reply

aviationMY

Hi, just saw your YT channel..

man..the cap is suit with you..
i just want to drop a comment but it say error..

so i commenting here..

keep up the good work Pascal..but one thing to ask..

what i can say..you video about thesis rules in Google..

Reply

Pascal

Hi Aviation, Thanks for comment.

Our blogging lab videos will aslo rule in Google. I am trying to make it soon.

Just now I checked in youtube. I am receiving comments and my test comment also worked well…

Reply

Pascal

Glad it works for you. I got your another comment with new archive link.

Reply

Suresh

hai mayank,

I saw your site.. your site map is working fine.. if you have further problem leave a comment..

Reply

Pascal

Hi Mayank,

In your http://techno-bb.com/sitemap page, you have installed already the google xml sitemap. So you can’t get the archives page in that page. If you want to do so, first you have to change the google xml sitemap page to another page. For this go to your google xml sitemap plugin and change the page name sitemap.xml into some other thing. Then you can create the archives page in http://techno-bb.com/sitemap.

But remember, when you change google xml sitemap to some other place name, you have to go and replace the new sitemap link in Google webmasters(if you have already given the sitemap in google webmasters).

I suggest you that don’t change the xml sitemap position. create your archives in techno-bb.com/sitemap-archives

Reply

Pascal

Hi Mayank,

I don’t know what settings makes you in problem.

Try this… uncheck the box in “Write a normal XML file (your filename)” and check the box in “Write a gzipped file (your filename + .gz)” at Google Xml sitemap and try again…

I haven’t tested this..try and tell me what happens..

Reply

Suresh

hai mayank,

First deactivate the google xml sitemap plugin (even delete the plugin is good)and remove if you are already submitted sitemap in search engines.

Now create new page in the name of sitemap. the page url should be your http://www.domainname.com/sitemap
once it created now you can activate xml sitemap (inatall plugin) and submit xml sitemap in search engines.

If the page is not created with this URL go in sdie the blog directory using FTP
open the folder domianname.com, In side this folder you have the file sitemap delete this file now again create the page with the url http://www.domainname.com/sitemap.

The problem may be the url domainname.com/sitemap has been first assigned xml sitemap.
ultimately the page url becomes site-map or sitemap1. so first create page then install xmal sitemap..

Reply

Suresh

hai,
have you created page? while publishing the page what it shows..
give your page url

Reply

Suresh

hai,
check your google xml sitmap plugin settngs
check automatic detection file name sitemap or sitemap.xml?
if it is sitemap change it into sitemap.xml

the file detected path should be domianname.com/sitemap.xml
also you have file sitemap.zip in your blog directory remove this file using ftp
the path is http://www.yourdomianname.com/sitemap

check out my adwordsshop.com/sitemap page which has the same problem like you previously its is working fine now i changed the file name sitemap instead of sitemap.xml after that it shows the xml version of the sitemap.
for your your sitemap page shows zipped version of sitemap thats why it down loaded.

after updating the settings wait until the next sitmap has build. it has been indicated in your xml sitemap settings option.

Reply

Extreme Acai

That is amazing thanks a lot it just worked amazing

Reply

Suresh

hai Extreme Acai,
Thanks.. get more tutorials on our youtube channel..

Reply

Beckz@tutorial wordpress

oks, my blog is new and I forget about it… lets do the game! :)
thanks again Pascal! :D

Reply

Beckz@tutorial wordpress

done perfectly ;-)

Reply

James Issac

Hey i must say that em here very late mate! but i guess not that late.
well its really a informative portal man keep it up…
U are like mi teacher in this thing bro…
Thanx alot Yoo..

Reply

Pascal

You are welcome James. Get download all the free guides. If possible, you can join in upcoming membership site. Thanks bro. Pascal.

Reply

Gabrielle

That is an amazing tutorial!!! Thank you very much. You saved me a lot of time having to piece together other articles and then trying to decipher code language and Thesis functions. Thanks!!!

Reply

Vincent

Another great tutorial! I find myself being directed here for every Thesis related search query I have….

Thanks

Reply

WP Content Plugins

What about Nofollow Tags. Should we add nofollow tag to our archive page or not.

Reply

Paramjit

Thanks for the great tutorial. I discovered that my images in Thesis were not being picked up by Google. It was not being picked up in the sitemap either. Its OK if you insert the image directly into the article but doe snot work if you include the image in the special location provided in the thesis theme. have you experienced this before?

Reply

Justin

Very good – thanks Pascal!!

Question: Do I need to submit this sitemap to google now or will it happen automatically?

Justin

Reply

SJ

Hi Suresh,

Is it possible to adapt your code to create a sitemap page that only shows a listing of posts from one category? (I know this isn’t a true sitemap, but it would serve a good purpose on my site.)

Thank you,
SJ

Reply

Sascha

Very Nice Tutorial, thank you.

Reply

rakesh kumar

Nice Tutorial , But does this sitemap is also indexed by Google or other search engine.

Reply

Adrian

Thank you for sharing this Thesis sitemap tutorial. Works like a charm!

Reply

Adrian

Actually – a word of caution. I tried on a second site and my site went down. Luckily I had a backup of my custom_functions but please proceed with caution,

Reply

Sherri

This worked like a charm! Thank you!!

Reply

Ed

Hello, i set up my sitemap fine. Thank you. Now I am trying to submit my sitemap in my webmaster tools account, but it is telling me it is a wrong format. Says it can not be HTML. Error says “Sitemap is HTML
Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.” How do I submit this sitemap to webmaster? Thanks Ed

Reply

admin

Hi Ed,

There are two kind of sitemaps.
One is html sitemap which is for our site users. An example of this sitemap page is
http://fourblogger.com/sitemap/ and in the above tutorial, I taught about that only.

The another one sitemap is for Search engines. This should be in the “xml” format.
I did a video about how to create xml sitemap and submit. The link is here.
http://www.youtube.com/watch?v=kLXNmuZDRlk

Reply

Gouri

Thanks for this helpful post on customizing archives page. Is there a way to display only categories and split it into 2 or more columns?

Reply

FourBlogger

if you go through the above given code, you can cleary see what parts of the codes shows what. So you can keep and remove what you want from the code.

Reply

Rasel Rony

Hey guys, I’ve successfully created sitemap and archive page, thanks fourblogger

Reply

How2Blog

Thnx sir :) Works pretty fine.

Reply

mazdodot

Great guys, good job. That’s code work fine for my blog…Thank you.

Reply

Sean Grimes

Thanks for the great tutorial. This is just what I wanted and it was easy to implement.

Reply

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post:


Popular Tags:

    Www worldwap com, sitemap, Worldwap com, sitemap archive for blogger, sitemap for thesis theme, sitemap thesis, sitemap thesis theme