Customize style of Sitemap Generator Plugin

Yesterday, I noticed that as I added more posts to this blog, it became more difficult to see an overview of the posts. On one hand, I could increase the number of posts shown in a page. On the other hand, this would increase the amount of bandwidth consumed. In the long run, this would be untenable. The obvious solution was to add a user friendly sitemap.

A quick google search turned up the Sitemap Generator plugin for WordPress. This is an excellent plugin, with many customization features. The plugin author was very friendly and responded well to feature requests.

I installed the plugin and activated it. The initial sitemap generated was great, but I noticed the lines were all squished together. It would look better if there were some margins between lines, to separate the links. Careful reading of the plugin page showed that the author has assigned two css classes to allow customizations: ddsg-wrapper and ddsg-pagenav.

The plugin author recommended modifying “style.css” directly. Here is an example:

div.ddsg-wrapper h2 { margin-bottom:0.5em; }
div.ddsg-wrapper ul { margin-bottom:2em; margin-top:0.5em; }
div.ddsg-wrapper li { list-style-type:circle; }

Append those lines to “style.css” file, and you are done.

Personally, I preferred not to fiddle with “style.css” file. Instead, I realized you could add custom style directly into the sitemap page, almost like adding inline style.

Normally, you create a page containing only:

<!-- ddsitemapgen -->


To add custom style directly into the page, create a page like this:

<style type="text/css">
div.ddsg-wrapper h2 { margin-bottom:0.5em; }
div.ddsg-wrapper ul { margin-bottom:2em; margin-top:0.5em; }
div.ddsg-wrapper li { list-style-type:circle; }
</style>
<!-- ddsitemapgen -->


Take a look at this blog’s sitemap (link in the sidebar) to see the results. Many thanks to the plugin author for his great work in making this possible.

Comments 2

  1. zania wrote:

    Hi bochap guy,
    I have just downloaded this plugin and found the same problem as you found (with the ‘squashing up’).

    And I just happened to see your comment on the plugin page and followed you here.

    This advice really helped.
    Thanks!

    Posted 04 Aug 2008 at 2:55 am
  2. chewearn wrote:

    Thanks for visiting. I’m glad it helped. :-)

    Posted 04 Aug 2008 at 11:56 am

Trackbacks & Pingbacks 1

  1. From Progress 10/06/2010 « Tara Jane Irvine on 11 Jun 2010 at 2:34 am

    [...] the style of the sitemap I found this http://blog.chewearn.com/2008/07/28/customize-style-of-sitemap-generator-plugin/Very useful!! Today I found out that the latest project wants an rss feed, made in wordpress, but I [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *