To improve the navigation of your users as well as search engine traffic and ranking to your WordPress blog I suggest making a good site map of your posts - a map of your site. A kind of user friendly archive of your posts. This is not “Google sitemap”!
The benefits:
There are 3 different versons of site maps that you can use, depending on how you want it. I have used the other 2 until I reached my final which is the first I want to brief you about.
This one is the nicest, most flexible and best if you write about different subjects but takes some time to set up. Once it is set up it is all automatic. If you have many categories and subcategories this is the best choice for user experience. You can fully decide the headings, order and basically everything. This is the final one for this blog which I currently use and developed myself.
Demo: See my site map here.
Guide how to set it up
<h1 style="margin-top:10px;">Major category</h1>
<div style="margin-left:70px;">
<h2>Subcategory</h2>
<ul>
<?php wp_cat_posts(21); ?>
</ul>
<h2>Subcategory</h2>
<ul>
<?php wp_cat_posts(38); ?>
</ul>
<h2>Subcategory</h2>
<ul>
<?php wp_cat_posts(27); ?>
</ul>
<h2>Other posts on main category</h2>
<ul>
<?php wp_cat_posts(29); ?>
<?php wp_cat_posts(30); ?>
</ul>
</div>
The numbers are the IDs of the categories. Repeat this code until you cover all your categories. You can then place a index with anchor links that jumps to sections like I did. You don’t need to include all posts and you can choose the exact sequence you want.
Use the DDSitemapGen. It is an extensive plugin with a lot of options and is 100% automatic. Just follow the instructions on that site on a new site map page and then in your template footer file and or at some other visible place, make a link pointing to your site map for full visitor and search engine link benefit.
This is best if you have a blog in just one subject and is simply just a list of all pages of your blog which can be sorted by date.
Demo:
Here is a demo of just 5 posts:
Guide how to set it up
<div style="width:300px;margin-left:50px;font-size:10px">
<br /><br />
<phpcode>
<ol>
<?php wp_get_archives('type=postbypost'); ?>
</ol>
</phpcode>
</div>
There is more about wp_get_archives here.
Which kind of site map do you use for your WordPress blog? If you are using the first version it would be nice if you commented with a link to it so we can see how it works for your WordPress blog.
If you found this page useful, consider linking to it.
Simply copy and paste the code below into your web site (Ctrl+C to copy)
It will look like this: Tutorial: Automatic Site Map for WordPress
[...] Tutorial: Automatic Sitemap in WordPress [...]
Pingback by That Girl From Marketing » Second Life Optimization From a User, Online Media and Consumer Electronic Purchases, 30% of MySpace Users Create Content? & YAPR about Second Life — October 26, 2006 @ 1:23 am
[...] WordPress Tutorial: Making a good sitemap for your Wordpress blog - 1 Minute Ago I just found this great tutorial on making great sitemaps for my wordpress blogs. Some of the benefits of having a good sitemap are: "* The user can quickly find a specific post he wants anytime he wants * The user can quickly see and get an idea how big the blog is get an overview on what the person is writing about. * All your posts are linked to from a single page to make sure they are not forgotten by the search engines. Basically PageRank is passed to all of them and they are not buried deep down in the archive. If there are no links to your old posts Google will put them in the supplemental index which is not good at all. " In this tutorial you will learn to make 3 different sitemaps for your wordpress blogs. Read the full tutorial by going to Wordpress Tutorial Cheers, Marifer Vergara Affiliate, Affiliate marketing consultant and all around good gal! Three-Legged Toad Comparison Shopping [...]
Pingback by WordPress Tutorial: Making a good sitemap for your Wordpress blog — November 14, 2006 @ 12:07 am
[...] Tutorial: Automatic Sitemap for WordPress (http://www.jimwestergren.com/tutorial-automatic-sitemap-in-wordpress/) [edit] [...]
Pingback by SEO in Wordpress | AskApache.com — November 18, 2006 @ 7:39 am
[...] I was thrilled with the article by Jim Westergren, “Tutorial on Automatic Site Maps in WordPress”, highlighting several different methods and WordPress Plugins to create different types of site maps. [...]
Pingback by The Art of a Good Site Map « Lorelle on WordPress — December 1, 2006 @ 9:41 am
[...] Lorelle chimes in on an article by Jim Westergren who has created a tutorial on the various ways of making a site map for your blog. We are not talking about the XML sitemaps, but instead a list of posts and pages throughout the site. [...]
Pingback by What Makes a Great Site Map? by Blogging Pro — December 1, 2006 @ 7:22 pm
[...] Tutorial: Automatic Site Map for WordPress “To improve the navigation of your users as well as search engine traffic and ranking to your WordPress blog I suggest making a good site map of your posts - a map of your site”. (tags: wordpress plugin google) [...]
Pingback by links for 2006-12-01 at Webmercial.dk — December 4, 2006 @ 4:31 pm
[...] Originally published in:: jimwestergren.com [...]
Pingback by Automatic Site Map for WordPress - All google and AdSense — February 23, 2007 @ 9:34 am
[...] Make a Site Map per my guide about that here. I prefer that you make the first version. [...]
Pingback by Success with SEO for WordPress — March 17, 2007 @ 5:00 am
[...] Use my article on how to make an automatic WordPresss Site Map and add one for your blog. I prefer that you make the first version in the guide. [...]
Pingback by SEO for WordPress - The Complete Guide - Business Online Blog — March 31, 2007 @ 9:48 pm
[...] Lea el artículo cómo hacer un sitemap para Wordpress de forma automática (inglés) y póngalo en practica en su blog. Es recomendable la primera versión de las expuestas la guía. [...]
Pingback by Caminante » SEO para WordPress — April 8, 2007 @ 1:57 am
[...] Aqui há um tutorial sobre três exemplos diferentes de sitemaps com a demonstração e como trabalhar com eles: Tutorial: Automatic Sitemap for WordPress [...]
Pingback by SEO para Wordpress — May 9, 2007 @ 7:50 pm
[...] Questo è un tutorial che mostra tre differenti esempi di sitemap con dimostrazioni e spiegazioni per impostarne: Sitemap automatiche per Wordpress. [...]
Pingback by ottimizzazione delle ricerche per Wordpress | valent — May 17, 2007 @ 7:51 pm
[...] http://www.jimwestergren.com/tutorial-automatic-sitemap-in-wordpress/ Tags: wordpress, plugin, blog, sitemap(del.icio.us history) [...]
Pingback by Tutorial: Automatic Sitemap in WordPress — June 10, 2007 @ 10:27 pm
[...] .2 Automatic Site Map [...]
Pingback by List of the Most Useful Wordpress Plugins For Your Wordpress blog ! | — June 12, 2007 @ 7:31 pm
[...] Sitemaps: Una sitemap o site map è una pagina che contiene una lista di tutti i post presenti sul proprio sito. Questo porta i visitatori del sito ad avere una visione d’insieme su quello che il sito propone e come trovare rapidamente i post. Ciò porta anche dei benefici per i motori di ricerca perché i link puntano a tutti i post del blog. Questo è un tutorial che mostra tre differenti esempi di sitemap con dimostrazioni e spiegazioni per impostarne: Sitemap automatiche per Wordpress. [...]
Pingback by SEO PER WORDPRESS PARTE II — July 14, 2007 @ 12:10 am
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by » En Yararlı Wordpress Eklentileri - FEY - İndir - Yükle - Download - — July 17, 2007 @ 12:10 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by En yararlı wp eklentileri | Domates Suyu — July 17, 2007 @ 1:14 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by En Yararlı Wordpress Eklentileri | www.Ovacuma.Com — July 18, 2007 @ 6:00 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by En Yararlı Wordpress Eklentileri | Ayiva.com — August 14, 2007 @ 8:27 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by En Yararlı Wordpress Eklentileri | Ayiva.com Blogca konuşmak.... — August 15, 2007 @ 8:55 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by En Yararlı Wordpress Eklentileri | Blogca konuşmak..... — August 22, 2007 @ 8:07 am
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by En Yararlı Wordpress Eklentileri — August 24, 2007 @ 8:31 am
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by WebmasterFans — August 30, 2007 @ 6:54 pm
[...] Sitemaps: Una sitemap o site map è una pagina che contiene una lista di tutti i post presenti sul proprio sito. Questo porta i visitatori del sito ad avere una visione d’insieme su quello che il sito propone e come trovare rapidamente i post. Ciò porta anche dei benefici per i motori di ricerca perché i link puntano a tutti i post del blog. Questo è un tutorial che mostra tre differenti esempi di sitemap con dimostrazioni e spiegazioni per impostarne: Sitemap automatiche per Wordpress. [...]
Pingback by BLOGBURGER: WordPress & SEO take away » SEO per WordPress - Parte II — September 19, 2007 @ 1:22 am
[...] There are, of course, plugins like the Dagon Design Sitemap Generator, which let you set up a 100% automatic sitemap and are very easy to use, or as Jim Westergren puts it: [DDSG] is an extensive plugin with a lot of options and is 100% automatic. Just follow the instructions on that site on a new site map page and then in your template footer file and or at some other visible place, make a link pointing to your site map for full visitor and search engine link benefit. [...]
Pingback by Handmade Wordpress sitemap - a tutorial : Sobek`s Wordpress Plugins — October 14, 2007 @ 3:59 pm
[...] Automatic Site Map - This is not a sitemap for the search engines. It’s a site map for your visitors; help your visitor to navigate around your blog, especially a blog with tons of posts. Needs PhPExec to work. [...]
Pingback by Administration Plugins : WordPress Business — November 15, 2007 @ 12:25 am
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by Wordpress Birçok Eklentisi Açıklamalı | BilgiBulvarı — December 2, 2007 @ 3:24 pm
[...] Automatic Site Map - This is not a sitemap for the search engines. It’s a site map for your visitors; help your visitor to navigate around your blog, especially a blog with tons of posts. Needs PhPExec to work. [...]
Pingback by Administration Plugins : WordPress Profit — January 28, 2008 @ 3:12 am
[...] La primera forma consiste en crear una nueva página en wordpress y , gracias al plugin phpexec, agregar código php en esta, y así listar todos los posts de tu blog. Usando la función wp_get_archives() de wordpress o wp_cat_posts() puedes crear un sitemap a tu gusto, si sabes programar claro. En esta página puedes encontrar más información sobre el plugin phpexec. [...]
Pingback by Crear mapa del sitio en wordpress | nosoloCodigo — February 2, 2008 @ 7:05 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by e-Commerce lite e ticaret eklentisi Advanced Search Search Reloaded Automatic Site Map Search Meter wordpress zengin metin editörü Widget indir Angsuman’s Multi-Page hemen yükle Page Link Manger Static Front Page eklentisi AdSense-Deluxe bedava indir — February 20, 2008 @ 8:14 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by e-Commerce lite e ticaret eklentisi Advanced Search Search Reloaded Automatic Site Map Search Meter wordpress zengin metin editörü Widget indir Angsuman’s Multi-Page hemen yükle Page Link Manger Static Front Page eklentisi AdSense-Deluxe bedava indir — February 20, 2008 @ 8:15 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by e-Commerce lite e ticaret eklentisi Advanced Search Search Reloaded Automatic Site Map Search Meter wordpress zengin metin editörü Widget indir Angsuman’s Multi-Page hemen yükle Page Link Manger Static Front Page eklentisi AdSense-Deluxe bedava indir — February 20, 2008 @ 8:16 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by Faydası bol olan wp eklentileri | Net ve Web Serüveni — February 23, 2008 @ 12:43 am
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by wordpress için ne ararsanız var :) - Wordpress en çok kullanılan eklentiler,wordpress eklenti arşivi wordpress eklentileri wordpress eklenti indir sitemap indir Widget Static Front Page Akismet Impostercide Ad Space adsense eklentileri — February 24, 2008 @ 9:12 am
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by wordpress eklenti indir wordpress hepsi bir arada eklentiler,wordpress eklentileri açıklamalı wordpress anket eklentisi wordpress blog sistemi için eklentiler — March 2, 2008 @ 7:46 pm
[...] Search Reloaded: Yine Wordpress’in arama yapısını biraz daha zenginleştirecek bir eklenti. Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı [...]
Pingback by WP | Benden seçmece eklentiler | Net ve Web Serüveni — March 14, 2008 @ 3:59 pm
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by Hayatın Işığı Altında.. » Yararlı ve Kullanılması Gereken Wordpress Eklentileri — April 15, 2008 @ 3:46 pm
[...] Automatic Sitemap - Creates a site-map of your blog for your readers to navigate. [...]
Pingback by 104 Useful Wordpress Plugins | General Marketing Blog — May 10, 2008 @ 2:48 am
[...] Search - Adds an advanced search to your blog. Automatic Sitemap - Creates a site-map of your blog for your readers to navigate. PHPExec - Allows you to add PHP [...]
Pingback by 8 » Blog Archive » 104 very useful wordpress plugins — May 10, 2008 @ 4:07 am
[...] Automatic Sitemap - Creates a site-map of your blog for your readers to navigate. [...]
Pingback by Blog Anything » 104 Useful Wordpress Plugins — May 10, 2008 @ 6:57 am
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by En Yararlı Wordpress Eklentileri « Yagmurunsesi’s Weblog — May 11, 2008 @ 9:07 am
[...] tutorial-automatic-sitemap-in-wordpress - three cases is considered. Must to read. http://www.jimwestergren.com/tutorial-automatic-sitemap-in-wordpress/ [...]
Pingback by Wordpress magazine: SEO and some plugins info | Wordpress Insights — May 12, 2008 @ 1:19 am
[...] WordPress users can use a plugin from Dagon Design, Site map Generator Plugin for Wordpress that generates your sitemap or Automatic Site Map for WordPRess. [...]
Pingback by Difference Between Sitemap and Site Map | Le Pixel Shoppe — May 16, 2008 @ 7:32 pm
[...] Tutorial: Automatic Site Map for WordPress [...]
Pingback by Rebecca’s Blog » Blog Archive » Google SEO for Your Blog — May 31, 2008 @ 11:20 am
[...] Tutorial: Automatic Sitemap for WordPress [...]
[...] Automatic Site Map: Bu eklenti arama motorları için değil, okuyucularınız için site haritaları oluşturmanızı sağlıyor. [...]
Pingback by | Düş'lerindir seni Var’eden — July 7, 2008 @ 9:53 am
I’ve followed your instructions and keep getting the following error:
Parse error: parse error in \wp-content\plugins\phpexec.php(61) : eval()’d code on line 2
Found the problem - when I copied and pasted this line
the single quotes ended up as not a plain single quote i.e.
‘
but a different style single quote
′
which threw my PHP……
Is there a simple way to add other fields or custom fields to the sitemap listing (e.g. id, region)
Ok thanks a lot for pointing that out. It explains a few things why another also could not get it to work. I have now replaced the ‘ signs with ' and I pasted in notepad and now it is good. I will do the same with my other php lines I have on the blog.
About the wp_get_archives there are more info here: http://wiki.wordpress.org/wp_get_archives and I have now added that to the post as well. Let me know if you have other questions.
I know there is a plugin or something that will replace the 66 / 99 type double-quotes with normal safe ones - and does the same for ordinary single quotes too…
Can’t remember the name of it though.
What I’m trying to do is use the sitemap feature you describe but add another 3 custom fields (very short) to the line(s) that are output. Having a hell of a time….
Have first tried yours, and then the other you suggested and you are using. I like the 2nd better, cause it looks alot better!
Thanks for the information, really helpful!
This article is now majorly revised and republished.
Very useful tutorial.
Thanks. I will try this on my blog.
bye
I’ve been trying to get this to work and I can’t seem to get the post to read the entry. I notice the wp_category plugin suggests PHP4 (untested on php5). Does anyone know if this does work in PHP5? I’m using 5 & wonder if that might be part of my issue.
Actually I don’t know. I use PHP 4 on this site.
very good tutorial.. thanks.. will have to try some of that on my blog..
The plugin DDSitemapGen is indeed nice looking and works well for blogs with a small number of posts.
However when using on sites with 3000+ posts, it’s a dog. Too slow to be of any use.
I took it off after just a few days.
Too bad, because it really is nice looking.
John,
If you set the “Items per page:” to 100 it will break up in different pages and load fast. Or you use any other of my versions, did you try that?
good info — and so simple! I just added the 3rd method to my existing archives for added bang.
Thanks!
Hi there,
I will find it very helpful for my blogs and will pay attention on building it up very soon.
Just wanna say Thanks a lot and keep writing such informations.
Puneet M
Hi All,
That is very good list which help us very well.
I will appreciat that and recommend to others.
And for viewers i Should tell that everybody do post this kind of lists.
With best wishes
Mehul Brahmbhatt
I’m thrilled with this article and will be highlighting it on my blog soon, but I wanted to clear something up that is causing a lot of people great confusion.
In ‘net vernacular, a “site map” is a blog or website’s listing of the articles on the site. A “sitemap” (one word) is a term used by Google and now MSN and Yahoo! to designate a specific type of file created by a sitemap program and stored on a site’s server that helps and guides a search engine through a website.
I HATE it when similar names are used for two different things, but this is how it is today. So you might want to update your article to put spaces between the site and the map so people will understand what you are talking about, which is fabulous information.
And stay tuned for some fun in your traffic.
Oh, and your captcha, like many of these useless things, isn’t working. I tried several times before it went through.
Thanks all.
Lorelle,
Thank you and you are so right! I hate that Google misuse the word sitemap. I have changed my wordings, thanks for clearing that up.
About the captcha, you mean that math question??
The obnoxious math question? Absolutely yes. It’s horrid.
Not only did it take several tries to tell it that 9+4 was 13, it is useless as comment spammers can now break these easily. They are even hiring people to manually break through more complicated captchas. Totally useless. Use Akismet, Bad Behavior, or Spam Karma and give your commenters a break.
The placement of the email notification also stinks, as it automatically subscribes someone, even when they may not want to, as it is below the Submit button. While I’m being critical (hee hee), I recommend you set it to be unchecked by default. You’ll have happier users.
Check out this article for a better perspective.
And stay tuned for fun.
PS: Please delete these notes if you want as they do not add to the conversation on this topic. Just a few kind words of advice and appreciation for the great article you wrote.
I’ve been using the 2nd example for a couple months now and I love it. It took me forever to find a decent plug-in and DDSitemapGen definitely does it’s job well. I think it’s imperative for blogs to have a site map (listed by category preferably). Makes for MUCH easier surfing.
Thanks Lorelle for spreading the link love.
I just see what works for me and use that. Perhaps it does not work the same for you but for me the math question kills 100% of all non-human comment spam. I already have Spam Karma 2 running since the creation of the blog and trackbacks I have disabled totally (not pingback, those are good). When I used the math question when commenting on other blogs it always worked fine.
As for the subscribtions I will have to think about that. It is easy for users to unsubscribe.
Take a look at this:
http://www.blog.mediaprojekte.de/archiv/
I’m going crazy for this sitemap. I don’t understand if it is a plugin: if yes, where I can download this beautiful plugin? If not, you all Gods of WP Plugins that reading this, make it a plugin!
Anyway, thanks for the tips, Jim
Max,
That is not a good example if you think about SEO and search engines. The links in that site map is not in the source code, I think it is called from a javascript.
It is called “King Archives Widget” and is not realesed as a plugin yet.
Wait to say that: I get it. You’re right, it’s called from a javascript, but for SEO and search engines I have the DDSitemapGen already installed in my blog and the sitemap generator for google. The thing here is to provide a more compact way for users to find content when you have a blog with 200 and more posts distributed in over 12 months.
Anyway, King Archives Widget is not the goal here, the goal is Extended live archives, wich is the plugin I’m talking about (now I know). I post the link for people interested in it:
http://www.sonsofskadi.net/extended-live-archive/
Installation is not so easy (or yes? Well, for me not), so I even post the link with instructions:
http://www.24fightingchickens.com/2006/01/03/extended-live-archives/
Plugin support:
http://www.flickr.com/groups/ela-support/
You can have some problem to setting up the plugin and make it work, depend on which version of wordpress you’re running and maybe OS you’re using and maybe browser (anything else?). But on my WP 2.0.4, firefox 2.0 and Win XP, the plugin do his job:
http://www.pulsazioni.net/archivio/
Sorry for little spamming this discussion with all this links (probably I’m a little OT here), but I think people (like me for example) that land on this page searching for a good plugin to organize his blog can be interested in this. Thanks again for your help, Jim
Thanks Max, very appreciated information.
I have followed from Lorelle’s post and have tried to implement method 1 and 2.
Apparently, PHP exec does not work for me (shows nothing, unless I put tags around the code, in which case it shows the code).
I have found Exec-PHP there, which miraculously did the trick.
In the interim, I had used method 2, which I found interesting but less flexible for what I needed to do (in particular, I want to have full control of the order in which categories appear).
Anyway, thanks for the tips.
I think the second example is really the easiest. I just set up a sitemap on another of my blogs and, using that method, had it all done in ~5 minutes.
Previously I had used the first example which took much more tweaking.
Thanks for the writeup.
Thanks for the tutorial Liew. Will be adding the blog Site Map to my blog as well now
Jim… just a quick “hi” and a very big “THANK YOU” for the depth of rich content you post on this site. Honestly, it must be a “labor of love” because I see folks every day of the week charging small fortunes for the info you give out for free!!!
The pay-back of course is that you enjoy far more traffic than many of those other “greed merchants”… and traffic is ALWAYS A GOOD THING:):):)
Regards,
Bruce
Thanks for the tutorial Liew
Thnaks for the download Link. Good work. Till next.
Than you very much.
I looked everywhere for a way to do option #1, I thought I would have to code it myself.
great tutorial. i have 14 blogs — gr8 to implement now
Hello Jim,
You have created a good guideline, thank you!
I did the last option which is 3. For me It the best and many sites use this type of site-map like Tech-Crunch.
Many thank for the great tutorial.
Many thanks for showing us how to do this. It is exactly what I had been looking for to do a Table of Contents for my blog which is at http://www.crankshawontech.com if you want to see how I set it up.
I did have to make one minor change in the wp_category_posts.php file to get a nice looking list format. I changed this line (line 29?):
echo ‘‘ . $post_title . ‘‘;
to this line (replaced the tag with a tag):
echo ‘‘ . $post_title . ‘‘;
Thank you!
Argh! I should have known better than to put code in a comment. I’ll try to re-phrase my previous comment. In the “echo” statement at the end of the wp_category_posts.php file, I deleted the line break tag (BR) and put the entire anchor tag (A) inside a list item (LI) tag.
Hope that makes sense. If it doesn’t and you need the file, send me an email.
David
Another idea to do this without the PHP Exec plugin is to use the #1 or #3 option above, but create a theme file to put the code on.
This is easily done by copying the page.php file from your theme’s directory (or the default theme directory if your theme doesn’t have one), and then modify it slightly to have the desired code from the option chosen. Name the new file with the name of the page (for example, sitemap.php) and you’re done.
According to the template hierarchy, when Wordpress gets a request for a particular page, it looks first for a file by that name, then page.php, then index.php. See http://codex.wordpress.org/Template_Hierarchy
great info, im doing sitemaps this weekend!
Thanks! Going to add this to my website ASAP.
I downloaded this plugin just before I upgraded to Wordpress 2.5.
I was using 2.3 and it worked like a dream (example one).
Then I tried to use it with Wordpress 2.5 and my categories in Wordpress no longer showed category ID numbers.
This is part of the code from example #1:
Major category
Subcategory
Do you have any idea where the category ID numbers can be found in Wordpress 2.5 or how should this code be altered so we get the nice Major Category headers with subcategories below?
Thanks so much for answering.
In WP 2.5 if you mouse over the link for the categories, you will see the ID at the bottom of your browser.
I was looking for something like for a long time… Thanks for the brilliant article. Will try it out on my site.