09/12/2006

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">
<h1>blah</h1>

<!– ddsitemapgen –>
<?php echo ddsg_create_sitemap(); ?>

</div>

<? 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
exclamation point
dash
dash
space
ddsitemapgen
space
dash
dash
right angle bracket

2 Comments to "Sitemap for WordPress 2.x"

  1. Terry says:

    This is really exciting. I was getting ready to build a "user sitemap" manually. Using the XML Google sitemap builder, which is cool….but having one for visitors is so important. (the other searchies like em too ;-)

    Terry

  2. Diane Vigil says:

    I'm glad it was of help.

    Actually, I've never had a problem getting pages indexed in Google — but making the structure of a blog (or any other site) intelligible to visitors is pretty important … and Before/Next links don't do that.

    We should remember, too, that there was a time when Google wasn't around, when there were a number of search engines all driving traffic to websites. Things sometimes change.

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.

Manage your subscriptions

Archives
© 2004-2017 DianeV Web Design Studio. All Rights Reserved.
34 queries. 0.405 seconds.