Sitemap Simple
Create an HTML sitemap of your pages, posts, custom post types or taxonomies with a shortcode or a block.
Install in
Display a clean, nested list of links to your content for visitors and search engines.
- Shortcode
[sitemap_simple]and a Sitemap Simple block with settings in the editor sidebar. - Pages (and any hierarchical post type), posts and custom post types, optionally grouped by year, month or taxonomy.
- Taxonomy sitemaps: categories, tags or any public taxonomy.
- Exclude by ID, page tree, page template or SEO “noindex” setting (Yoast SEO, Rank Math, SEOPress).
- Accessible markup: optional heading and
<nav aria-label>landmark. - Built-in caching that clears itself when content changes.
- Works with Polylang and WPML (see FAQ).
Why not an XML sitemap?
WordPress already generates an XML sitemap at /wp-sitemap.xml. This plugin creates a visitor-facing HTML sitemap page.
Usage
Basic sitemap of pages:
[sitemap_simple]
Add a CSS class (several allowed) or an ID:
[sitemap_simple class=”example”]
[sitemap_simple id=”example”]
Exclude pages:
[sitemap_simple exclude=”21,29,25″]
Show only pages below the current page, or siblings of the current page:
[sitemap_simple depth=”2″ child_of=”CURRENT”]
[sitemap_simple child_of=”PARENT”]
Latest posts grouped by category, or by month:
[sitemap_simple post_type=”post” group_by=”category”]
[sitemap_simple post_type=”post” group_by=”month” show_date=”created”]
A custom post type:
[sitemap_simple post_type=”product” limit=”200″]
Taxonomy terms:
[sitemap_simple taxonomy=”category” show_count=”1″]
Skip noindex items and landing page templates:
[sitemap_simple exclude_noindex=”1″ exclude_template=”template-landing.php”]
Accessible heading and navigation landmark:
[sitemap_simple heading=”Site map” heading_tag=”h2″ aria_label=”Sitemap”]
Attributes
post_type– slug of any public post type. Defaultpage.taxonomy– slug of a public taxonomy; lists terms instead of posts.child_of– an ID,CURRENTorPARENT(pages and hierarchical taxonomies;CURRENT/PARENTpages only).depth– 0 = all levels, 1 = top level only.exclude,include– comma-separated IDs (page/post IDs, or term IDs for taxonomies).exclude_tree– comma-separated page IDs whose children are also excluded.exclude_noindex–1to skip items marked noindex in Yoast SEO, Rank Math or SEOPress.exclude_template– comma-separated page template files to skip.sort_column–post_title,menu_order,post_date,post_modified,ID,post_author,post_name(comma-separated). For taxonomies:name,slug,count,term_id.sort_order–ASCorDESC. Pages and terms default to ascending, posts to newest first.group_by– posts only:none,year,month, or a taxonomy slug such ascategory.limit– posts only: maximum items. Default 500, maximum 2000.show_date–createdormodified, with an optionaldate_format.show_count,hide_empty– taxonomies only.heading,heading_tag(h2-h6),aria_label,class,id– markup.language–allto list every Polylang language instead of the current one.cache–0to disable caching for this sitemap.
Only published items are listed.
For developers
sitemap_simple_list_args,sitemap_simple_term_args,sitemap_simple_query_argsfilter the arguments passed towp_list_pages(),wp_list_categories()andWP_Query.sitemap_simple_outputfilters the final HTML.sitemap_simple_strip_classes(defaulttrue) – returnfalseto keep the classes WordPress adds to list items.sitemap_simple_cache_ttl(default 12 hours) – return0to disable caching.sitemap_simple_default_limit(500) andsitemap_simple_max_items(2000).
Written by Joobi from the project's own listing. See the source page
1.5.0
- New: Sitemap Simple block with sidebar settings (WordPress 5.5+).
- New: posts and custom post types, with grouping by year, month or taxonomy.
- New: taxonomy term sitemaps (
taxonomy,show_count,hide_empty). - New: exclude by page tree, page template or noindex setting (Yoast SEO, Rank Math, SEOPress).
- New: optional heading and
<nav aria-label>landmark. - New: output caching with automatic invalidation, and an
uninstall.phpthat removes it. - New: Polylang language handling and WPML compatibility.
- New:
sitemap_simple_term_args,sitemap_simple_query_args,sitemap_simple_output,sitemap_simple_cache_ttlfilters. - Code is now class-based;
sitemap_simple_shortcode()still works.
1.4.0
- Fix: the
classattribute printed the value ofid. - Security: shortcode attributes are whitelisted and sanitised; draft/private content can no longer be listed through attributes.
- Fix: removed the invalid
=&reference assignment toget_post(). - New:
include,sort_column,sort_order,show_date,date_format,post_typeand thesitemap_simple_list_argsfilter. - Requires WordPress 5.0+ and PHP 7.4+.
1.3
- Compatibility update.
1.2
- Initial release.
Follow this listing's changes (Atom feed)