[post_sitemap]

The shortcode displays a sitemap of posts.


Product


Shortcode Attributes

  1. title – The title to display above the sitemap
    • Options: Any text value.
  2. layout – The layout style for the sitemap.
    • Options: 1, 2 (not styled yet).
  3. order – The order in which the pages are listed.
    • Default: title.
    • Options: ID, title, author, date, modified, parent, menu_order, random. Specify one only.
  4. exclude_taxonomies – Comma-separated list of taxonomies to exclude from the sitemap.
    • Options: Any text value.
  5. hierarchical – Whether to display posts hierarchically (if applicable).
    • Default: on.
    • Options: on, off. Specify one only.

Example Usage

[post_sitemap]
[post_sitemap title="My Post Sitemap" layout="2" order="date" exclude_taxonomies="category,tag" hierarchical="off"]

Results

Example 1
This example will generate a sitemap of all posts using the default settings.

Example 2
This example generates a sitemap with a custom title, uses a compact layout, sorts posts by date, excludes posts from the “category” and “tag” taxonomies, and disables hierarchical display.
The order attribute is automatically prefixed with post_ if it is one of the following: title, author, date, modified, or parent. This ensures compatibility with the hi_list_posts function.