Using a Shortcode to Display Your HTML Sitemap

All in One SEO has a shortcode which you can use to display your HTML Sitemap anywhere on your site.

This method can be used within the Classic Editor or Block Editor in WordPress, or with any page builder.

To learn about setting up the HTML Sitemap, check out our article on How to Create an HTML Sitemap here.

The main shortcode to use to display the HTML Sitemap is:

[aioseo_html_sitemap]

There are also some attributes you can use to customize what is displayed.

You can see the shortcode by clicking on Shortcode in the Display HTML Sitemap section of the HTML Sitemap settings.

Shortcode option in the Display HTML Sitemap section

You can see all of the attributes by clicking on the Advanced Settings link next to the shortcode.

Advanced Settings link next to the shortcode in HTML Sitemap settings

The attributes for the shortcode are:

  • post_types – Use this to specify which post types you want displayed in the sitemap. You can list multiple post types separated by a comma. Make sure you use the slug for each post type, i.e. post, page
  • taxonomies – Use this to specify which taxonomies you want displayed in the sitemap. You can list multiple taxonomies separated by a comma. Make sure you use the slug for each taxonomy, i.e. category, post_tag
  • label_tag – Use this to specify the HTML tag you want to use for the labels above each section in the HTML Sitemap. The default is H4
  • show_label – Use this to control whether labels are displayed above each section in the HTML Sitemap. The values are true or false, and the default is true
  • publication_date – Use this to control whether the date your content was published is displayed next to each content item in the HTML sitemap. The values are true or false, and the default is true. See the documentation here for more details
  • archives – Use this to control whether a compact archive is displayed instead of the HTML Sitemap. The values are true or false, and the default is true. See the documentation here for more details
  • order – Use this to control the direction in which content is listed in the HTML Sitemap. The values are ASC or DESC and the default is ASC (ascending). See the documentation here for more details
  • order_by – Use this to control the order in which content is listed in the HTML Sitemap. The values are publish_date, last_updated, alphabetical or id and the default is publish_date (Publish Date). See the documentation here for more details

Here’s an example of how to use these attributes:

Posts


Pages

  • Profile (November 14, 2020)
  • Suggest a Feature (November 14, 2020)
  • Support (November 14, 2020)
  • AIOSEO Affiliate Program (November 14, 2020)
  • AIOSEO Changelog (November 14, 2020)
  • AIOSEO Coupon Code (November 14, 2020)
  • Allow Emails from All in One SEO (November 14, 2020)
  • Blog (November 14, 2020)
  • Cart (November 14, 2020)
  • Checkout (November 14, 2020)
  • Configuration Service (August 19, 2021)
  • Contact Us (November 14, 2020)
  • Support Login Information (November 14, 2020)
  • Docs (November 14, 2020)
  • FAQs (November 14, 2020)
  • Features (November 14, 2020)
  • Local SEO (November 14, 2020)
  • Rich Snippets Schema (November 14, 2020)
  • Robots.txt Editor (November 14, 2020)
  • RSS Content (November 14, 2020)
  • SEO Audit Checklist (November 14, 2020)
  • SEO Custom User Roles (November 14, 2020)
  • Smart XML Sitemaps (November 14, 2020)
  • Social Media Integration (November 14, 2020)
  • TruSEO On-Page Analysis (November 14, 2020)
  • Video SEO Sitemaps (November 14, 2020)
  • WooCommerce SEO (November 14, 2020)
  • FTC Disclosure (November 14, 2020)
  • Home (November 14, 2020)
  • Installation Service (August 19, 2021)
  • Lite Upgrade (March 4, 2021)
  • Login (November 14, 2020)
  • My account (November 14, 2020)
  • Press & Brand Assets (November 14, 2020)
  • Pricing (November 14, 2020)
  • Pricing Lite (March 4, 2021)
  • Pricing Upgrade (July 9, 2021)
  • Privacy Policy (November 14, 2020)
  • Shop (November 14, 2020)
  • Terms of Service (November 14, 2020)
  • Testimonials (November 14, 2020)
  • Translating All in One SEO (November 14, 2020)



  • This feature is new in version 4.1.3 of All in One SEO. There is no legacy documentation for version prior to v4.x.