Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Version 3.14   Updated Monday, May 12th, 2008 at 8:20pm

Sitemap Generator Plugin for Wordpress

This plugin creates a sitemap for your WordPress powered site. This is not just another XML sitemap plugin, but rather a true sitemap generator which is highly customizable from its own options page in the WordPress admin panel. Some of its features include: support for multi-level categories and pages, category/page exclusion, multiple-page generation with navigation, permalink support, choose what to display, what order to list items in, show comment counts and/or post dates, and much more. To see this plugin in action, visit my sitemap page.

Notice:
I am currently experimenting with the WordPress Extend database to manage the downloading of plugins. Because of this, the folder name for the plugin is currently ’sitemap-generator’ instead of ‘dd-sitemapgen’.

If you are upgrading, please delete the ‘dd-sitemapgen’ folder before uploading the new version.

Download

Languages

The latest version of this plugin includes complete support for language files. If you would like to submit a translation, please contact me. You can choose the language from the options page.

Current languages: English, Albanian, Brazilian-Portuguese, Bulgarian, Czech, Dutch, French, German, Italian, Japanese, Lithuanian, Polish, Romanian, Russian, Simplified Chinese, Slovene, Spanish, Swedish, Turkish, Ukrainian

The language file contains not only the text shown on the sitemap page, but all of the text in the options page as well.

Changelog

  • 05-12-08 Version 3.14 - Fixed an issue for xhtml compliance. Removed trailing whitespace in plugin file (was cause of ‘headers already sent’ error for some). Adjusted code to handle permalinks better.
  • 04-26-08 Version 3.13 - The plugin has been tested and works in WP 2.5. Added language files: Lithuanian, Romanian, Italian, Ukranian, and updated Spanish. Updated for compatibility with the WP Security Scan Plugin (thanks Michael). Undefined offset errors should be gone now. Updated the code that displays post/page titles. Fixed issue where comment counts showed on new lines.
  • 09-26-07 Version 3.12 - Instead of having separate plugin versions for pre and post WP2.3, this version handles everything from WP 2.1 to 2.3. There is a separate download for those using WP 2.0. A bug was also fixed that caused posts to be duplicated in 2.3.
  • 09-22-07 Version 3.11 - Bug fixed - categories were not showing up if they had a parent category with no posts.
  • 09-20-07 Version 3.1 - Now supports WordPress 2.3. Added Czech, Russian, and (updated) French language files.
  • 07-27-07 - Not a version update - added Albanian, Bulgarian, Swedish, and Turkish language files.
  • 07-08-07 Version 3.07 - Post titles with html formatting should now show up properly in the sitemap. Slovene language file added.
  • 06-22-07 Version 3.06 - Updated to display sub-categories (with posts), even when parent category has no posts.
  • 06-20-07 Version 3.05 - Ampersands (in titles) issue fixed.
  • 06-18-07 - Not a version update - added French and Brazilian-Portuguese language files.
  • 05-31-07 Version 3.04 - Better support for international date formatting added (using the date_i18n function). Option to limit multi-cat posts to one cat removed for now due to incompatibility issues. Spanish and Polish language files added.
  • 05-17-07 Version 3.03 - Parse error bug fixed. Non-published (draft) pages now hidden.
  • 05-16-07 Version 3.02 - Updated to work with WordPress 2.2. Drafts no longer appear in the sitemap. Added new languages: Simplified Chinese, Dutch, and Japanese.
  • 05-09-07 Version 3.01 - Bug fixed with future post check. German language file added.
  • 05-03-07 Version 3.0 - This is a very big update. Most of the plugin has been rewritten from the ground up. Many things have been fixed, several new features have been added, and it runs much faster than before. Be sure to read the updated information below.
  • 03-24-07 Version 2.73 - Sitemap page navigation will no longer show ‘/1/’ in the URL for the first page. The same method has also been applied for those not using permalinks.
  • 02-09-07 Version 2.72 - Fixed a compatibility issue with this plugin and some of my others.
  • 01-25-07 Version 2.71 - Fixed bug when used with WordPress 2.1
  • 09-17-06 Version 2.7 - You can choose to show excerpts even when a post or page title exists. They settings are now independent.
  • 04-02-06 Version 2.6 - The page and category exclusion lists are no longer case-sensitive. An issue has also been fixed for excluded categories that have non-excluded sub-categories. They now show up properly. Lastly, an issue was fixed where sites with more than 10,000 posts were having problems generating the sitemap.
  • 03-23-06 Version 2.5 - Lots of optimizations, runs much faster. Can now exclude pages (and subpages). Options page completely redone. All visible text is an option (under Language Settings). Comment count only counts approved comments.
  • 03-21-06 Version 2.4.2 - Some minor code adjustments. Works properly when the Google Analytics plugin by boakes.org is enabled.
  • 03-18-06 Version 2.4.1 - Several minor issues fixed. Rewrite code greatly improved. Added option to change ‘continued text’. Can now generate sitemap on error pages.
  • 03-14-06 Version 2.4 - Several requested features added: Choose to show everything, or just posts or pages. Can show publish date for posts (and configure the date/time format). Added ability to exclude categories. Option to open links in new windows
  • 02-16-06 Version 2.3.1 - Fixed uploads/attachments showing up in sitemap.Fixed small bug when sorting pages by title.
  • 01-23-06 Version 2.3 - Permalink support for navigation added! (read permalink section below for more info)
  • 01-22-06 Version 2.2.1 - Option to hide password-protected items. Fixed navigation bug (when Wordpress was in sub-folder).
  • 01-21-06 Version 2.2 - Rewritten again! - Handles multi-level categories and pages. Continuation of previous posts/pages shown. Customizable text for category pages. Separate sort orders for posts and pages. CSS added for easy customization. Always hides drafts and future-dated posts now (there’s no reason not to). Multi-category posts handled much better. ‘Breadcrumb trail’ for sub-categories. For posts without titles - display ‘(no title)’, first X characters, or first X words. And many other fixes/updates.
  • 01-14-06 Version 2.0 - Rewritten completely, and turned into a plugin
  • 01-15-06 Version 2.1 - New features and various fixes: -
    Handles custom table prefixes. Fade effect upon submitting options (for WP 2.0 users). Option to display posts or pages first. For posts without titles, choose to ignore, use “(no title)”, or first few words of text. Place sitemap navigation at the top, bottom, or both.
  • 01-14-06 Version 2.0 - Rewritten completely, and turned into a plugin
  • 12-08-05 - Original (non-plugin) version 1.0

Installation

  • Download sitemap-generator.zip and uncompress
  • Upload the entire sitemap-generator folder (not just the files inside) to your plugins directory
  • Activate the plugin in your administration panel
  • Configure the plugin in the options panel (under DDSitemapGen)
  • If using permalinks, read the permalink section below
  • Simply add the following line to a WordPress page (where you would like the sitemap to display):
    <!-- ddsitemapgen -->

    Note: For those of you using the new rich-text editor - be sure to click the ‘html’ button to edit the page source directly. Otherwise Wordpress will wrap code tags around the line which generates the sitemap and it will not work properly.

Upgrading?

To upgrade, disable and then delete the existing plugin. Then install the new version as explained above.

After you install, be sure to click the ‘Load Default Options’ button, as some of the settings have changed.

Version 3.0 of this plugin is a big jump from the previous versions. Most of the code has been rewritten from scratch, and a few things are different. One of the best improvements is the speed and stability. The sitemap generation is much faster now, which should especially help people with larger sites. Be sure to read the updated information below.

Want to run the plugin from a template file?

To use the sitemap generator function directly from a template file, just insert the following line where you would like the sitemap to be generated:

<?php echo ddsg_create_sitemap(); ?>

Permalinks for sitemap navigation

Depending on your settings, the sitemap may be spread across multiple pages. If you are using permalinks, be sure to enter the page slug of your sitemap page in the plugin options. That way it will use permalinks for the sitemap navigation as well. If you are not using permalinks, simply leave this option blank.

CSS declarations

This plugin has a couple of CSS classes built in to easily change the look of your sitemap. Just add the new declarations to your themes CSS file, and customize it however you like.

  • .ddsg-wrapper - Div around the entire sitemap.
  • .ddsg-pagenav - Div around the page navigation.

Available Options

These options can be configured from the options page in the WordPress admin panel. Most of these are fairly self-explanatory.

General Options

  • Language - Language files are located in /wp-content/plugins/sitemap-generator/lang/
  • Items per page - Set to 0 for unlimited
  • Sitemap page slug - If using permalinks, enter the slug of your sitemap page

Sitemap Generation

  • What to show - Show posts, pages, or both
  • If showing both, which first - Show posts or pages first
  • Post sort order - Sort by title or date (oldest or newest first)
  • Page sort order - Sort by title or date (oldest or newest first) or menu order (ascending or descending)
  • Show comment count after posts
  • Show comment count after pages
  • If showing comment counts, display when zero
  • Show dates after posts
  • Show dates after pages
  • Date format (if showing dates) - Use PHP date() formatting

Exclusions

  • Excluded categories - Category IDs, separated by commas. Sub-categories will also be excluded, as well as all posts contained in excluded categories
  • Excluded pages - Page IDs, separated by commas. Sub-pages will also be excluded
  • Hide future-dated posts
  • Hide password-protected items

Navigation

  • Sitemap navigation method - Two types to choose from
  • Show sitemap navigation - Where to show the navigation

Miscellaneous

  • Full path to XML sitemap - If you are also using an XML sitemap plugin, you can enter the path to the XML file here, and a link to it will be added to your sitemap page
  • Where to show XML sitemap link - At the end of the last page, or at the end of every page
  1. Hi, was really excited about this plugin. Wanted to test on my personal blog before adding to business blogs.

    Downloaded it, uploaded it, activated it, configured it, placed in the html editor on the page I created.

    Viewed site - nothing. The page is blank.

    Any ideas? I am running WP 2.3.3 on this blog. Any suggestions is appreciated.

  2. Thank you for creating this plugin, it’s just what I was looking for!

    I sometimes post recipes in my blog and I wanted them to be easy to find. I’ve created a page called Recipes, added your code to display the sitemap on that page, and just set the plugin to exclude posts from every category except the Recipes category.

    Now visitors can click on my recipes page and see everything I’ve got there, all in one place! :)

  3. Thank you kindly for this plug-in.
    It works wonderfully.

  4. 1093
    ameljor

    Hi,
    just wondering, can you get sitemap to include tags?

  5. The sitemap page only shows page 1, it does not show any page after that. It shows that there are 3 pages, but when I click on next page it shows the first page only.

  6. 1091
    Ingo

    Hi,

    very nice plugin, but I think it doesn’t work correctly with WP 2.6!
    If I click on next Page or on the number 2 to view the next site the content doesn’t change, but the URL changes to …/sitemap/2/ or …/sitemap/3/ …
    I checked a view sitemaps posted here, only one worked correctly.

    Thx in advance

  7. Hi.

    Can you update the options so we can include categories to “opt in” to the site map versus only “opt out”. The problem is that we use multiple categories for topics and we add new categories.

    Under the current options, we have to “opt out” in your options page everytime we create a new category, which we don’t want to do. We want to specify only the “opt in” categories.

    Thank you!

    http://www.thecepblog.com/site-map

  8. Great!

  9. I have used the sitemap tools, and it is really very interesting.
    Once again, thanks do much for your work.
    Here you can see how beautiful is: http://www.tvcamer.com/sagong/sitemap
    Best regards

  10. Ok.. Need expert help. I have this installed, but for some reason, I can not bring the next page with different categories.
    http://www.briantinsley.com/sitemap

    My site map page says this:
    <!-- ddsitemapgen -->

    My sitemap page slug says=sitemap

    I can not seem to get to the second/third pages of my sitemap. All the information is just showing the first page only. How in the heck do I fix this please!

    Thanks,
    Brian Tinsley
    http://www.briantinsley.com

  11. I think there is a bug in function ddsg_remove_empty_cats, the last no posts categories will display in the output, like default categorie, so I made some fix.

    
    /*
     * Remove categories with no posts
     */
    function ddsg_remove_empty_cats($post_data) {
    
    	$llp = -1;
    	$last_type = 'c';
    	$last_level = '0';
    
    	$pdc = count($post_data);
    
    	for ($i = $pdc - 1; $i >= 0; $i--) {
    
    		$type = $post_data[$i]['type'];
    		$title = $post_data[$i]['title'];
    		$level = $post_data[$i]['level'];
    
    		if (($type == 'c') && ($last_type == 'c') && ($last_level <= $level)) {
    			$post_data[$i]['type'] = 'r';
    		} else {
    			$last_type = $type;
    			$last_level = $level;
    		}
    		
    		if ($post_data[$i]['type'] == 'p') {
    			$llp = $post_data[$i]['level'];
    		}
    
    	}
    
    	$new_post_data = array();
    	foreach ($post_data as $pd) {
    		if ($pd['type'] != 'r') {
    			$new_post_data[] = $pd;
    		}
    	}
    
    	return $new_post_data;
    
    }
    

  12. Very nice, simple and easy to use.
    I installed,
    set settings,
    created a page called sitemap,
    went to edit it,
    and in the HTML tab, placed <!-- ddsitemapgen -->
    saved

    http://www.ericastjohn.com/sitemap/

    and it works right out of the box.
    Easy and simple! Thanks for this :)

  13. Very nice, simple and easy to use.
    I installed,
    set settings,
    created a page called sitemap,
    went to edit it,
    and in the HTML tab, placed
    saved

    http://www.ericastjohn.com/sitemap/

    and it works right out of the box.
    Easy and simple! Thanks for this :)

  14. http://briantinsley.com/sitema/

    It’s just showing this:

    !–p echo ddsg_create_sitemap();–>

  15. I can not get this figured out.. I am not sure what is wrong.
    I have the plug in down loaded. I have updated my permalinks page to say “sitemap” and updated the settings.

    I have created a sitemap page, where my slug says, /sitema/.
    What’s interesting is when I got to edit the plug in, I have to click on the Google XML option then this plugin shows up to be able to edit it.

    I have spent will over 1.5 hours trying to figure this thing out. There NEEDS TO BE CLEAR STEP BY STEP instructions provided.
    I know it’s probably something simple, but this is ridiculous.
    Thanks,
    Brian

  16. thanks

  17. thanks a lot…

  18. thankss

  19. This is working too good. For me. I have linked to you from my blog in wordpress plugins post because I love your plugin.

    Regards,
    iwebie (http://www.iwebie.com)

  20. Thank you for a wonderful plugin! My visitors became much easier to seek information for themselves.

  21. thanks…

  22. 1075
    mark

    thanks, worked great.

  23. 1074
    Thomas

    yes there is, i don’t know if it is the best way but it works.

    in the plugin there is a folder called lang. There you choose the language you installed, open the php-file and then there is a definition like this for english.php

    define(’DDSG_PAGE_HEADER’, ‘Pages’);
    define(’DDSG_POST_HEADER’, ‘Posts’);

    and then you simply change it to this

    define(’DDSG_PAGE_HEADER’, ”);
    define(’DDSG_POST_HEADER’, ”);

    this works

  24. 1073
    mark

    and is there a way to remove the “Posts” title from the top of the content?

  25. 1072
    mark

    is there a way to exclude a parent category and not a sub-category. i want to be able to list sub categories without them being listed in the parent category above it. it is a little redundant. for example:

    Parent Category: Education
    Sub Categories: Post-Secondary, Secondary, K-12

    Posts are categorized with ‘Education’ as well as ‘K-12.’ Is there a way to just list the Sub Categories under Education?

  26. 1071
    Thomas

    could somebody give me a sample of his/her css file because i don’t know how to costomize my plugin

    thanks..

  27. 1070
    Thomas

    thanks a lot…

    i searched a lot for a true sitemap.. and this is the best..

  28. thank you.

  29. Thank you plugin.

  30. True sitemap generator…
    thanks…

  31. True sitemap generator which is highly customizable is such relieve in our daily blog managing activities. Great advantage on getting better SERP too.

  32. 1065
    new user

    I just installed the plugin, but alas, it produces only one page (and I have a LOT of posts). It just won’t go on to page two. I tried deactivating all the other plugins, but nothing. Help!

  33. I love your plugins–they rock because they actually WORK and instructions are so easy to use.

    However, I’m wondering if you can add additional formating for the Sitemap. I am using it as an “Achive” list because I couldn’t find any good or easy to use Archive plugins.

    It seems that all the content in sitemap list is “squished together” or allows only 1 line break. Anyway to double space or even change the word make the Category titles bold–to clean up organization? Anyway to highlight (bold or make the font bigger on) the Title of the category instead of the word “category” instead?

    Or another great upgrade is to allow all the Categories to list (as a group) at the top of page for easier navigation (jumps to sections instead of scrolling down pages).

    Many thanks for your great plugins!

    p.s. I’m on v.2.2 and do not plan to upgrade. I hope all your upgrades are backwards compatible.

  34. How can I submit it to Google?

  35. thx for the great stuff!

  36. I will give a try and do that at my blog. I already download it today.

  37. nice plugin.thank you sir.

  38. Hi,
    very usefull Plugin for WP. thx!

  39. Got it working on Wordpress MultiUser WPMU
    http://butyoureagirl.com/2008/05/01/sitemap/

    nice plugin!

  40. i use wp 2.3.1 and so far it work perfectly

  41. Could someone please help to short my problem described below?

  42. thanks great..

  43. 1054
    Pete

    I may be blind, but I am ging around in circles trying to find where I can download the sitemap generator. from what I have seen it looks like a worthy plugin. where can I find it?

  44. I’ve created the sitemap using this plugin and everything seems to work fine, but I couldn’t submit it to Google Webmaster.

    The location of my sitemap is: http://www.myblogname.com/index.php/sitemap

    As my domain is registered in Google Webmaster, all I did when was adding a sitemap, included the following as a location of my sitemap:

    index.php/sitemap

    But now it says: Status: ERROR

  45. This is “the plugin”. Nothing without it. Every blogger know is using it.

  46. great ,how to use ?

  47. This plugin is great. Thank you very much!

  48. great nice plugin.

  49. thank you for plugin.

  50. Wonderful! I even managed to get it to fit into my page template with a tag template on the page.

    Now, if I can only remember what I did just now next time…

    Thanks a bunch!

  51. This is a great plugin. Works a charm, many thanks.

  52. Thanks for the great plugin, it’s much appreciated.

  53. 1044
    Rita

    Hi-
    I downloaded an installed and activated the latest plugin, but do not see DDSitemapGen in the options panel. Am I missing something?

    Thanks,
    Rita

  54. 1043
    Casey

    Is there a place in the php file where I can add something like

    post_status == ‘publish’

    to get the site map to generate ONLY pages that are published?

  55. hi,
    I am trying to download your plugin, but when I click on download for Wordpress 2.5 it takes me to the wordpress plugin directory page and when I click on Dagon Design Sitemap Generagor it brings me back to your download page, I click download and the whole thing starts again.
    Is it me?
    Kind regards
    Pauline

  56. Thank you very much for sharing this great plugin.

  57. Nice Plugin - The Team from Deluxe Label (Germany)

  58. Firs of all, thanks so much for the plugin. It really great and very easy to use.

    I have 3 feature requests (if I may be so bold):
    1) option to rename or remove the bold-faced “Category:” that comes before each category

    2) option to rename or remove the words “Posts” and “Pages” that come at the top of those lists, respectively.

    3) option to show posts that appear in a sub-category even if the parent category is empty (for example imagine I have a main category as “Food” and sub-categories: “Breakfast, Lunch, Dinner, Snacks.” Right now, if there are posts in each sub category but none in the parent category, none of the sub-category posts will appear).

    Thanks again!

  59. This plugin is great. Thank you very much!

  60. Hello there,
    something went wrong by me - my RSS feed isn’t working and I can’t find any solution. I tried first to disable sitemap generator and it worked. But now, after several attemps to find what’s wrong it didn’t work even when sitemap generator is disabled :-(

  61. 1036
    Jacknight

    I have installed this plugin and made a sitemap page with

    I could make sure the page was displayed (by preview page) when unpublished, but once published, it caused the 404 error.

    How can I fix this?

    Thank you in advance.

  62. June 8, 2008 — I have installed this plugin on three different Wordpress sites, each running WP 3.5.1. As soon as it is activated, I get this error message:

    Warning: main(/home/protect/public_html/wp-content/plugins/sitemap-generator/lang/English.php) [function.main]: failed to open stream: No such file or directory in /home/protect/public_html/wp-content/plugins/Sitemaps Generator Plugin for WordPress/sitemap-generator.php on line 48

    Warning: main(/home/protect/public_html/wp-content/plugins/sitemap-generator/lang/English.php) [function.main]: failed to open stream: No such file or directory in /home/protect/public_html/wp-content/plugins/Sitemaps Generator Plugin for WordPress/sitemap-generator.php on line 48

    Warning: main() [function.include]: Failed opening ‘/home/protect/public_html/wp-content/plugins/sitemap-generator/lang/English.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/protect/public_html/wp-content/plugins/Sitemaps Generator Plugin for WordPress/sitemap-generator.php on line 48

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/protect/public_html/wp-content/plugins/Sitemaps Generator Plugin for WordPress/sitemap-generator.php:48) in /home/protect/public_html/wp-content/plugins/WordPress Automatic Update/wordpress-automatic-upgrade.php on line 92
    The Asset Protection Institute

  63. I am curious if there is a way to have it not sort by category. If you click on the sitemap it is forcing me to sort it by category and I just want to show posts based on publish date..

  64. Thank you for this plugin! I was able to modify the output to make a table of contents for my Writing section. Now it displays exactly how I wanted! I couldn’t have done it without your plugin.

  65. thanks

  66. Great plugin! I just installed it and am also looking for a way to customize the sitemap labels to specifically fit my blog..

  67. 1030
    Benjamin

    Great plugin, however is it possible to change the two headings ‘Posts’ and ‘Pages’ to something else (i.e. ‘Articles’ and ‘Other’) as this would fit in a lot better with my blog. I am sure it is just a case of editing the code a little, however I cannot work out which parts to edit?

    Thanks.

  68. Just downloaded and installed it. Works perfect. Thanks for all your good work!

  69. installed on my blog, but it seems the firs page and first post appears in line with Pages and Post text, any ideas?

  70. Hi,
    I use your plugin on website:
    http://www.hoffman.wroc.pl/mapa-strony
    and every post and pages is TRIPLED!
    I don’t know why?
    I’m just moving site from local host to web provider using mysql dump. Of course I Load Default Options but without success. I also try to delete plugin but without success. Could you help me?

  71. What is the URL of the DD sitemap??

  72. @ingo: Thanks again for the reply.

    I already did what you suggest:


    Options Followsymlinks
    RewriteEngine On

    RewriteBase /blog/
    RewriteCond %{REQUEST_URI} ^/blog/sitemap
    RewriteRule ^/blog/sitemap/([0-9]+)/$ /index.php?pg=$1 [L]

    RewriteBase /blog/
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?$ http://aecomics\.com/blog/$4/ [R=301,L]

    # BEGIN WordPress
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    # END WordPress

    But still doesn't work, I'm going to play a little more with the .htacess.

    Thanks again for your time.

    Greetings,

  73. @Edian
    It seems to be a small mistake. Simply play something with the configuration o the htaccess file. Sorry about my english. Read an understand is no problem, but write. It is a shame, I know.

  74. @Edian
    RewriteCond% {REQUEST_URI} ^/sitemap and after it RewriteBase /blog/ is an incongruity. ^/sitemap is a mistake if the blog is inside a folder. Try RewriteBase /blog/ before, or directly RewriteCond %{REQUEST_URI} ^/blog/sitemap. The .htaccess in root seems to be O.K.

  75. This plugin can be great jump start for new blog, especially improving its SERP rankings.

  76. Thanks for this great tool, I have been having issues with my site map and this works perfect.

  77. @Ingo: Thanks for replying,

    I forgot to tell that my blog it’s inside a folder.

    Here’s my .htaccess at root, I change the actual URL by {mypage}:

    Options +Indexes
    Options +FollowSymLinks
    RewriteEngine on

    #convert www to no-www
    RewriteCond %{HTTP_HOST} ^{mypage}
    RewriteRule (.*) {mypage}/1 [R=301,L]

    #add the nice / thing to the end of the url
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule (.*) {mypage}/1/ [L,R=301]

    Here’s my .htaccess inside of my blog’s folder:
    Options Followsymlinks
    RewriteEngine On

    RewriteCond %{REQUEST_URI} ^/sitemap
    RewriteRule ^sitemap/([0-9]+)/$ /index.php?pg=$1 [L]

    RewriteBase /blog/
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?$ {mypage}/blog/$4/ [R=301,L]

    # BEGIN WordPress
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    # END WordPress

    I try to put the RewriteBase /blog/ before the 2 lines for the sitemap and still doesn’t work,

    Any advice?
    Thanks again,

  78. 1019
    fcdagon

    Hi - Thanks for the great plugin. No problems with installing on WP 2.5.1. I'd like to customize both the style as well as change the instances of the title "Posts" and the word "Category" preceding each category to make sense in the context of the site. Can you please point me toward the line of code where I can change these instances? I could not find previous references on your site. Much thanks!

  79. 1018
    fcdagon

    Hi - Thanks for the great plugin. No problems with installing on WP 2.5.1. I’d like to customize both the style as well as change the instances of the title “Posts” and the word “Category” preceding each category to make sense in the context of the site. Can you please point me toward the line of code where I can change these instances? I could not find previous references about this on your site. Much thanks!

  80. Wonderful plugin. However the navigation doesn’t seem to be working. Always stays on page one, regardless which navigation style is chosen

  81. Hi…i used this plugin in many of my sites. Recently i feel this that is there any possibility i can format the output on the sitemap page.

    I need them little spaced out. they appear little clumsy on page.

  82. Sorry - the line I added was the ddsitemapgen line…

  83. I created a new wordpress page and simply added this line to the body. I titled the page sitemap, and it created it. When I submitted the page url to Google it came back with an “unsupported file format” error. What did I do wrong? I’d appreciate any help.

  84. Hi,

    I tried to use your site map plugin but I have display bug in the sitemap generation:

    when the post contains ‘ like l’acteur et le système

    it displays: &#8217 like l&#8217acteur et le système
    @+Oliv

  85. Thanks for this amazing plugin. This is the plugin that I was looking for

  86. Hi,
    I tried updating to version 3.14 but I got this error.
    Now I can’t even go back to the old version.
    What can I do to fix this?

    Fatal error: Cannot redeclare ddsg_add_option_pages() (previously declared in …/wp-content/plugins/sitemap-generator/sitemap-generator.php:55) in …/wp-content/plugins/sitemap-generator/sitemap-generator.php on line 54

    Thanks.

  87. 1010
    Boris C.

    I have installed plugin and even “sitemap plugin by dagondesign.com” appears in my sitemap directory, but i don’t see categories or posts.

    All i have is:

    * (no title)

    And “sitemap plugin by dagondesign.com”

    Does it take Sitemap Generator time to crawl posts?
    What is the problem?

  88. Hello,

    I have been using ddsitemap generator since several versions now, for french wp blogs. I met with the following error just after activate the plugin:

    **********************************************
    Warning: main(/mnt/157/sda/6/7/meets/wordpress/wp-content/plugins/dd-sitemap-gen/lang/french.php) [function.main]: failed to open stream: No such file or directory in /mnt/157/sda/6/7/meets/wordpress/wp-content/plugins/dd-sitemap-gen/dd-sitemap-gen.php on line 48

    Warning: main() [function.include]: Failed opening ‘/mnt/157/sda/6/7/meets/wordpress/wp-content/plugins/dd-sitemap-gen/lang/french.php’ for inclusion (include_path=’/mnt/157/sda/6/7/meets/include:.:/usr/php4/lib/php’) in /mnt/157/sda/6/7/meets/wordpress/wp-content/plugins/dd-sitemap-gen/dd-sitemap-gen.php on line 48

    **********************************************

    I got the help of someone knowing php, who gave this solution to me, that I now apply version after version:

    instead of letting :
    *********************
    /*
    * Load language file
    */
    $ddsg_lang_file = trim(get_option(ddsg_language));
    if ($ddsg_lang_file == ”) {
    $ddsg_lang_file = ‘English’;
    }
    include ABSPATH . ‘wp-content/plugins/dd-sitemap-gen/lang/’ . $ddsg_lang_file . ‘.php’;

    ****************************

    I change the last line for:
    include ABSPATH . ‘wp-content/plugins/dd-sitemap-gen/lang/French.php’;

    ****************************

    I thought you may want to know, and look for a solution to improve next version. :)

  89. @Edian
    Try to write the two lines at the top of the .htaccess direkt after “RewriteEngine On”. My complete htacces look like this:

    RewriteEngine On

    RewriteCond %{HTTP_HOST} !^backlinkportal\.com$
    RewriteRule ^(.*)$ http://backlinkportal.com/1 [L,R=301]

    RewriteCond %{REQUEST_URI} ^/sitemap
    RewriteRule ^sitemap/([0-9]+)/$ /index.php?pg=$1 [L]

    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

  90. I’m having the same problem that Yaakov, I try the solution from Ingo:

    RewriteCond %{REQUEST_URI} ^/sitemap
    RewriteRule ^sitemap/([0-9]+)/$ /index.php?pg=$1 [L]

    But doesn’t work, I have a few lines for .htaccess and I think that’s what it is messing with DDSitemapGen.

  91. Wonderful plugin. However the navigation doesn’t seem to be working. Always stays on page one, regardless which navigation style is chosen.

    Yaakov

  92. The navigation didn’t work by me too. It was always shown page 1.

    Now, with

    RewriteCond %{REQUEST_URI} ^/sitemap
    RewriteRule ^sitemap/([0-9]+)/$ /index.php?pg=$1 [L]

    in the .htaccess it works perfectly

  93. Forget it - I figured it out

  94. sorry - the ddsitemapgen line

  95. … then where it states to add

    to a WordPress page, do you mean to create a new page, or to add it to one of the .php files like “sidebar”?

  96. Under the installation instructions it says to activ ate the plugin from the adminstration panel. I’m not sure where to find that. I’m in my cpanel under file manager, but there doesn’t seem to be a way to activate plug-in’s. I’m truly sorry for my ignorance but if there’s any direction you could lend i’d appreciate it.

  97. Ignore that. It’s working now. Weird.

  98. I just upgraded to the latest version and when I chose category IDs to exclude, they are still being included. Any advice? I’m using WP 2.5.1. In the meantime, I’m going to try downgrading plugin version.

    Thanks.

  99. 998
    Coisox

    I had install and activate this plugin. Under DDSitemapGen,after change a little bit, I click “Update Option”.

    Then what? It say “Configuration Updated!”. Where’s the xml? I cant find in my root?

    Another question, WP has the export function for backup. Cant I use it as Google sitemap since the extension same?

  100. Excellent, Version 3.14 fixed my problem. :)

    Thanks!!

  101. Tom Stone: I am relatively new to the SVN which is what adds support for the ‘one click upgrade’ for plugins. I have not actually used that feature yet. I suggest just uploading the plugin directly to your plugins folder.

    Jorge: There is a big download button on that page.

  102. Pretty unclear instructions:
    If you are upgrading, please delete the ‘dd-sitemapgen’ folder before uploading the new version.

    I followed that instruction exactly, after seeing that a new version were available. Deleted the ‘dd-sitemapgen’, and then I pressed the upgrade-link in the admin-area.

    Then the upgrade function got stuck, because it couldn’t find the folder and files it was supposed to upgrade. So now I have to re-install the plugin again.

    I don’t know what you advice us to do - but it is obviously not what you have written.

  103. Thank you for this plugin :)

  104. Hello

    I would like to test your plugin but the download link in this page goes to a page that points again to this page. A circle without solution.

  105. Version 3.14 has been released

    Fixed an issue for xhtml compliance. Removed trailing whitespace in plugin file (was cause of ‘headers already sent’ error for some). Adjusted code to handle permalinks better.

  106. 991
    Will

    Hey,

    I just upgraded from 3.12 to 3.13 and now clicking on the next page simply displays results for page 1. So If I click on page 10 for example the url will change correctly to page 10 but page 1 results are still shown.

    These use to work just fine in htaccess:

    RewriteRule ^(sitemap)/([0-9]+)/$ /index.php?pagename=$1&pg=$2 [QSA,L]
    RewriteRule ^(sitemap)/$ /index.php?pagename=$1&pg=1 [QSA,L]

    RedirectMatch permanent /sitemap/index.php$ /sitemap/
    RedirectMatch permanent /sitemap/([0-9]{1})/index.php$ /sitemap/$1/

    Now they seem to have no effect, since if I remove them I see the same behavior.

    Any thoughts?

    Thanks,

    Will

  107. 990
    Will

    Small “bug” from keeping it 100% Valid XHTML 1.0 Strict…

    sitemap-generator.php Line 1209:

    Replace With:

  108. 989
    Ted

    I`m using permanent links but cannot seem to get the plugin page links to work. It works well without the slug entered but gives a 404 whenever I enter the correct slug as `sitemap` or index.php/sitemap`. I have the WordPress files located in a subdirectory, and the blog exists in the site root. Any suggestions?

  109. Thx a lot…good job..

  110. Sorry for the number of comments I’m posting.
    I also have this ‘Headers already sent by…’-error when I try to log-in or log out, so there must be some kind of bug in this version.

  111. I am using the latest version btw.

  112. When I activate or deactivate a plugin, I get an (PHP) error that the headers were already sent by … (this plugin). So I think that there’s a bug in this version or is it just me?

  113. Great work!Nice plugin! Thank you!=)

  114. Great!!!

    I’ve just published my sitemap :-)
    http://www.danireef.com/mappa-del-sito-site-map-2/

    wonderful plugin!

    Thanks!

  115. When using permalinks in Wordpress 2.5 or later, the simply slug “sitemap” works for the first page, but all the links to subsequent pages are created without “index.php”, which results in 404s.

    Specifying “index.php/sitemap” as the slug for the plugin fixes this problem.

    This has probably more to do with changes made in the way 2.5 treats permalinks than with your plugin, but I thought you’d like to know.

    Otherwise, fantastic work!

  116. Hello,

    Thanks for the interesting and useful plug-and the result which is now in my article directory under http://www.artikelplanet.de/artikel-sitemap/.

    Alex greetings …

  117. Hi DagonDesign,

    Thanks for this plugin.

    I just upgraded to the latest version (3.13) from the previous version and now numerically represented characters are not being displayed, only their number. So an emdash coded as & # 8 2 1 2; without spaces of course, shows as the number rather than an emdash like this — (but one long line w/o a gap of course :)

    Hope this feedback is helpful.

    Cheers, -Alan

  118. WP 2.5.1 and Sitemap Generator plugin 3.13 I put in page http://www.igoralekseev.com/blog/sitemap/

    HELP! Will only display pages. Will not display posts!

  119. I re-downloaded site map gen at 18:25CDT, reactivated the security plugin and the behavior returned. Will only display pages. Will not display posts. I’m removing cookies and etc.

  120. I had to disable WP Security Scan 2.2.60.1 because sitemap generator 3.13 was displaying only pages, no posts. No errors visible.

  121. I just uploaded a new copy of the file - it looks like the one that was uploaded was not correct.

  122. 975
    Tony Carnell

    I’m also getting the same error whilst trying to activate…
    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /mnt/w0203/d43/s01/b02d7cef/www/something.com/wp-content/plugins/dd-sitemap-gen/dd-sitemap-gen.php on line 818

  123. Herzlichen Dank für dieses tolle Plugin,
    es ist genau das, was ich gesucht habe.

    Liebe Grüße aus der Schweiz

    Ezri

    ***********************

    Thank you so much, this is the plugin I ever want.

    Greets from switzerland
    (sorry for my bad english)

    Ezri

  124. 973
    Daniel

    OH, btw 3.12 was working is there any way I can download that somewhere?

  125. 972
    Daniel

    Won’t activate…
    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /mnt/w0203/d43/s01/b02d7cef/www/something.com/wp-content/plugins/dd-sitemap-gen/dd-sitemap-gen.php on line 818

  126. Version 3.13 has been released

    This update fixes a compatibility issue with the WP Security Scan Plugin (http://wordpress.org/extend/plugins/wp-security-scan/). Thanks go to Michael at semperfiwebdesign.com for bringing this issue to my attention.

    New language files have also been added: Lithuanian, Romanian, Italian, and Ukranian

    The Spanish language file has also been updated.

    Other fixes:
    - Undefined offset errors when PHP error reporting is enabled should be resolved
    - The code which displays post/page titles has been updated
    - Fixed an issue where comment counts were being shown on new lines

  127. A saviour for people like me… Amazing stuff man.. Also the xml addition makes u fabulous.. u are genius!

  128. works perfect on wp 2.5 , i am currently using on my site now :)

  129. Omg. Simply said there’s a “ddsitemapgen” comment slug there

  130. Oh, it cuts off. Here’s what i find there:

    (without spaces)

  131. Hello, I’ve done everything as needed, but when I load a page where sitemap should be, I see a blank page, and looking in page sources i find there
    What’s wrong?

  132. Nice plugin. Works perfectly for me to provide a human readable sitemap for quick reference on my site.

  133. 964
    Kalel

    There are some minor errors in the code that were thrown when I had error_reporting enabled. I don’t think these errors affected my output, but thought I’d let you know anyways. These minor errors come from v 3.12.
    1) Undefined offset: line 341
    2) Undefined offset: line 626
    3) Undefined offset: line 632
    4) Trying to get property of non-object: line 341
    4) Trying to get property of non-object: line 626
    5) Trying to get property of non-object: line 632

  134. This is a great plugin. I have got some great use out of it.
    Thanks, Randy

  135. WP Security Scan - 2.2.56.54 Causes the Sitemap to NOT display the POSTS. It will display the pages but for some strange reason the POSTs disappear. If I disable this Plugin things are fine again.

    Any ideas?

  136. Awesome plugin. Works like a charm for my site. Thanks buddy! :)

  137. 960
    Matty

    I’m having the same problem as the guy below, I insert the <!– ddsitemapgen code into the post but only a link to the sitemap.xml appears.

  138. Hi,

    Thanks for making this plugin available. However, I can’t get it to work in conjunction with the Google XML Sitemap plugin and WP 2.5. When I remove the “Sitemap.xml” and “sitemap.xml.tgz” files from my root directory, DD Sitemap works great. But as soon as I activate the Google XML sitemap plugin, DD Sitemap won’t work. Any ideas?

  139. 958
    Brad

    I’m using the Page Category Plus Plugin (http://www.stuff.yellowswordfish.com/page-category-plus/) which gives pages the ability to be assigned to categories. Is there possibly an enhancement you could add to your sitemap plugin to display the page categories on the sitemap, just like the post categories are displayed?

    Or if it’s easy, can you show which lines to change/add to the plugin php code to accomplish this?

    Thanks!

  140. Chris: I have tested a few sites, using the sitemap with multiple pages, and have not had any problems yet. It is possibly a conflict with something else (another plugin?), but I am still trying to reproduce the problem. If you could, please try disabling any other plugins to test.

  141. I had to change the “Items per page:” option to 0 so it would display on one page. Displaying on multiple pages now longer works. The links are generated but it always shows page one.

    For me this is no big deal. I can leave with a one page site map. Just thought it might help some of you that are having problems.

    Thanks for the plugin!
    Regards

  142. Hi, I’m using this with WP2.3.3 and works perfectly in my local server.
    When I uploaded and installed it in my live server, it got installed but now when I go to plugins page, its totally blan