Sitemap for WordPress 2.x
I've been playing around with WordPress 2.x, which has some enhancements from earlier versions (including usability enhancements) — but found that the wonderful Weblogtoolscollection.com "narchives" Site Map has not been updated to work with WP2.x.
This is a drag because, in my experience, blogs lacking sitemaps are much more difficult to surf around. Oh, sure, you can visit each of the categories, or follow Earlier/Next links — but there's a limit to how many of those I'd click on before, more or less, losing interest. I'd just like to see everything in one go.
Aleister at DagonDesign to the rescue, with a WordPress 2 Sitemap plugin. It's quite nice: first, it works; it displays categories and/or pages with links to each item in the category or Page selection. Secondly, you can set options (want dates displayed along with the links?) right in the WP control panel without having to get your hands dirty in the code.
I quickly made a site map using the DagonDesigns sitemap generator. Just upload it to the WP plugins folder, activate it in the WP Control Panel (under Plugins), configure it in Options, and make/upload your actual sitemap file. With a little bit of futzing* I was able to come up with this code for the sitemap page; not sure it's all needed but it works:
<?php require('wp-config.php'); $single = 1; $siteurl = get_settings('siteurl'); ?>
<?php include('wp-blog-header.php') ?>
<?php get_header(); ?>
<div id="content" class="narrowcolumn">
<!– ddsitemapgen –>
<?php echo ddsg_create_sitemap(); ?>
<? include(TEMPLATEPATH . '/sidebar.php'); ?>
<?php get_footer(); ?>
Done. I also discussed with Aleister making a donation via PayPal and removing the link to dagondesigns and he gave his gracious consent. I think that's fair given the time he's obviously put into it — time which I won't have to put into it.
* Yeah, I know. I'm in L.A. and one learns a bit of Yiddish. So futzing is Yiddish for … well, let's say it translates out to "messing around with" and be done with it. <grin>
NOTE: Since WordPress turns any instance of two dashes into one (and converts three dashes into an mdash), if you copy & paste the above code, you'll need to fix the comment tags — it should be:
left angle bracket
right angle bracket
2 Comments to "Sitemap for WordPress 2.x"
Have your say ...
First-time comments will be held for moderation (but comments are appreciated). Otherwise, just be courteous. If your name is a bunch of keywords, your comment will be deleted. Don't post links unless highly pertinent. Posters must be 16 or older.