WP Sitemap

2010-01-23 @ 19:44

A HTML sitemap with both post and pages. Easy to implement, just add a shortcode tag in a page.

Tags: sitemap, html sitemap, table of contents, seo.
Requires at least: 2.9
Tested up to: 2.9
Stable tag: 1.0

Download from: Devdevote
Download from:
WordPress.org

Demo

Description

Place a shortcode into a post or a page (page recommended) and your HTML sitemap will apear as a list, complete with page numbers.

Shortcode simple example

[wp_sitemap]

Features

  • Support for both posts and pages
  • Support for page numbers and option to place it on top or bottom
  • Support for include and exclude pages / posts
  • Support for disable posts / pages
  • Support for order by and sort order
  • No data added to the database
  • No settings page added into admin
  • Sitemap settings are added through a shortcode added in a page
  • WordPress built in functions are used to make a very small code

Shortcode advanced example

[wp_sitemap pages="false" exclude="9,21,34"]

Parameters

exclude

  • (string) Define a comma-separated list of Page IDs to be excluded from the list (example: ‘exclude=3,7,31′). There is no default value.

include

  • (string) Only include certain Pages or Posts in the sitemap. Like exclude, this parameter takes a comma-separated list of Page IDs. There is no default value.

posts

  • (string) Include Posts. Valid values:
    • true – Posts are included. (Default)
    • false – Posts are not included.

pages

  • (string) Include Pages. Valid values:
    • true – Pages are included. (Default)
    • false – Pages are not included.

sort_column

  • (string) Sorts the list of Posts and Pages in a number of different ways. The default setting is sort newest first by Post / Page date.
    • ‘post_date’ – Published Post / Page date. (Default)
    • ‘post_title’ – The Post or Page title.
    • ‘post_modified’ – The updated Post or Page date.
    • ‘comment_count’ – The number of comments on a Post or Page.

sort_order

  • (string) Change the sort order of the list of Pages (either ascending or descending). The default is ascending. Valid values:
    • ‘ASC’ – Sort from lowest to highest.
    • ‘DESC’ – Sort from highest to lowest. (Default)

paging_position

  • (string) The position of the page numbers. Valid values:
    • ‘top’ – Add page numbers above the sitemap list
    • ‘bottom’ – Add the page numbers below the sitemap list (Default)
    • ‘both’ – Add page numbers above and below the sitemap list

post_count

  • (string) Sets the number of Pages and Posts to display. The default is 50.

Shortcode default settings

If you don’t know what this means, just ignore this section.

  • exclude => 0
  • include => 0
  • posts => ”true”
  • pages => ”true”
  • sort_column => ”post_date”
  • sort_order => ”DESC”
  • paging_position => ”bottom”
  • post_count => 50

Installation

This section describes how to install the plugin and get it working.

  1. Upload the folder ‘wp-sitemap’ to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Add the shortcode [wp_sitemap] to a post or a page (page rekommended)
  4. Look at the post / page. Done!

Frequently Asked Questions

Where is the settings page?

There are none. You can add settings into the shortcode.

Screenshots

  1. Maybe soon. It’s just a list of posts and pages with page numbers.

Changelog

1.0

  • Initial release

Upgrade Notice

1.0
This is not an upgrade, it’s an initial release.

Support this plugin

  • Report bugs. Be detailed about the problem.
  • Spread the word.
  • Share/Bookmark
RSS-feed for comments

34 replys to “WP Sitemap”

  • Etienne
    2010-01-24 @ 8:09 e m

    hi,

    thanks for this simple and efficient plugin.
    I have a feature request. I am maintaining a bilingual web site (french and english).
    Thus I have 2 different sitemap pages.
    Instead of using 2 different plugins (one for each language), I would appreciate to able to use only one plugin with 2 different shortcodes.
    I assume it represents a lot of work but I am sure it would be highly appreciated among the WP community.

    Reply
  • Etienne »
    2010-01-24 @ 8:17 e m

    Another feature request :-)
    I assume that the sort order depends on the page ID.
    Would it be possible to sort the static pages with the order pages appear in ?

    Reply
  • Kalliey »
    2010-01-25 @ 10:07 f m

    Danke. Funktioniert prima.

    Reply
  • bakar
    2010-01-25 @ 3:19 e m

    Thanks for making this plugin

    Reply
  • Nemrod Kedem »
    2010-01-25 @ 3:29 e m

    Hi,

    Possible bug… Seems like the newest post is not included in the list.

    Nemrod.

    Reply
    • admin »
      2010-01-31 @ 2:56 e m

      I can’t recreate the problem.

      Reply
  • Marc Hesp »
    2010-01-25 @ 10:59 e m

    Nice work.
    Could you enhance it with:

    - nested pages
    - hiding of children of excluded pages

    Keep it up!

    Reply
    • admin »
      2010-01-31 @ 2:54 e m

      Both requests are quite hard to code but I’ll keep them in mind. Thanks!

      Reply
  • Miklos »
    2010-01-31 @ 1:37 e m

    Hi,

    I am using WP 2.9.1 and the plugin failed activation with the following fatal error :

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /wp-content/plugins/wp-sitemap/wp-sitemap.php on line 18

    Reply
  • Miklos »
    2010-01-31 @ 1:49 e m

    It turns out it was due to the fact that PHP4 was running, rather than PHP5. When I switched, it initiated fine.

    Reply
    • admin »
      2010-01-31 @ 2:53 e m

      Yes. I forgot to add that WP Sitemap requires PHP5. Thanks for your report.

      Reply
  • Kiwi »
    2010-02-10 @ 9:10 e m

    Is it possible to add it to just the footer.php so it’s on every page? If so what code do I use?

    Or does it have to be inserted into every page?

    Thanks

    Reply
  • Kiwi »
    2010-02-10 @ 9:33 e m

    Pls ignore the post above, I’m an idiot. Worked it out.

    Thanks.

    Reply
  • Drake »
    2010-02-17 @ 9:57 f m

    Hi Jens, thank for sharing it. I tried it and seems very nice, simple but functional.
    I suggest and would happy to see in next releases the possibility to have an include/exlclude notation for tags and categories.

    I don’t know how much difficult could be, anyway thanks again ;)

    Reply
  • Drake »
    2010-02-21 @ 4:25 e m

    Another suggestion, if I can, is to have the possibility to disable the sort, so that the article specified in the include=”…” will appear in the same order as written there…

    Bye ;)

    Reply
  • WP Sitemap für WordPress « ScriptBookmarks »
    2010-02-22 @ 11:56 f m

    [...] WP Sitemap für WordPress erzeugt eine Seite, welche die Seiten des WordPress Blogs auflistet. Mit Shortcodes kann die Ausgabe formatiert werden. So können zum Beispiel einzelne Seiten von der Listung ausgeschlossen werden. [...]

    Reply
  • WordPress Plugin Releases for 02/15 | Son Of Byte - Web Design & Development »
    2010-02-28 @ 1:04 f m

    [...] WP Sitemap [...]

    Reply
  • Stefan »
    2010-03-09 @ 4:53 e m

    I use your plugin on one of my pages (http://sfcd.eu/blog/inhalt) and noticed, that it shows an EDIT button for the last post displayed when I’m logged in and it shows a comment field for the last post displayed too if I allow comments for this post (which I therefore disabled).

    Maybe it’s just a bug in my theme (dkret)? I don’t know – do you?

    Reply
  • Stefan »
    2010-03-09 @ 5:01 e m

    Okay, I managed it to remove the edit function and the comment field in my page.php without destroying my blog and everything is fine! :-)

    Reply
  • mike »
    2010-03-10 @ 7:18 f m

    the plugin is showing issues in the syntax when trying to activate.

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homepages/5/d303230798/htdocs/searchamania/wp-content/plugins/wp-sitemap/wp-sitemap.php on line 18

    Do you what the fix is? Besides upgrade to php 5?

    Reply
    • admin »
      2010-03-10 @ 11:22 f m

      PHP4 is not yet supported, might be in the future.

      Reply
  • Jan-Olov »
    2010-03-10 @ 10:06 f m

    Hi, is there any setting to change to get more than 50 post on the site map?
    Or get a page breake?

    Reply
    • admin »
      2010-03-10 @ 11:22 f m

      [wp_sitemap post_count="100"]

      Reply
  • Jan-Olov »
    2010-03-11 @ 7:37 e m

    Ok quite obvious when I read and understand what I’m reading.
    The pagination don’t work for me, is it because I have WP 2.92?

    Reply
  • Jan-Olov »
    2010-03-13 @ 7:52 f m

    I have checked some more, and it seams that the pagination option is mixed with the next gen gallery paging. I can get pagings if I have a value lower than 30, but it only opens a gallery.
    So Your plugin works for me as well if I deactivate next gen gallery, but I don’t want to do that. As is it works but it only shows the posts I put in in the option post_count and it’s good enough for me at the moment.
    Thank’s for the plugin.

    Reply
  • WordPress Plugin Releases for 02/15 »
    2010-03-17 @ 10:37 f m

    [...] WP Sitemap [...]

    Reply
  • Miroslav Čermák »
    2010-03-20 @ 7:18 e m

    Thanks for making this plugin. Great!

    Reply
  • John »
    2010-03-20 @ 10:48 e m

    Hello! great plugin. I have a problem, i use this plugin but can`t close the comments at the sitemap page. I think the plugin is the problem.

    Reply
  • The Online Resources Directory »
    2010-03-23 @ 8:47 e m

    I tried the plugin, it seems pretty cool and easy enough to implement. Thanks for the instructions, it seem to work very well with the default configuration, so i saw no need to change it. having said that, as soon as i start including and excluding pages or post, then it start going funny again.

    Reply
  • Idaho Falls »
    2010-05-12 @ 8:04 e m

    GREAT plugin, I use it on a few sites and it’s simple and works. I did just try to install it on one of our sites but received a fatal error, something I haven’t received before. I uploaded the plugin, and when I tried to activate it, the message reads:

    +++++++++++++++++
    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /nfs/c02/h09/mnt/27147/domains/tetonspringslodge.com/html/adventures/wp-content/plugins/wp-sitemap/wp-sitemap.php on line 18
    +++++++++++++++++

    Any clue on what’s happening?

    Thanks again, kind regards.

    Frank

    Reply
  • Charles »
    2010-06-27 @ 7:08 f m

    Idaho Falls, you need to upgrade to php5

    Reply
  • Doron Orenstein »
    2010-07-21 @ 1:36 f m

    Hello there,

    For some reason, as soon as I add the include parameter, I get no results even if I know for a fact that the category I’m specifying does indeed have posts associated with it.

    Is this a known issue with a workaround?

    Thanks!

    Doron

    Reply

Leave a reply