Generate an HTML Sitemap using the shortcode [ uhs-sitemap ]
with support for the Rank Math plugin.
Shortcode Example:[ uhs-sitemap post-type="" cat="" depth="" tag="" by-tags="true" exclude="" cat-links="" primary="" columns="" ]
Shortcode Options:
- post-type: If you want to show the sitemap for single post type, such as a product sitemap for WooCommerce, simply add post-type=”” to the shortcode. Example
[ uhs-sitemap post-type="posts" ]
. Accepted values include, page or pages, post or posts, product, products or woocommerce and the custom post type name of any custom post type - cat: Enter a category slug you wish to display, works for posts and WooCommerce products (other custom post types upon request)
- depth: Set to 1 to only show parents and exclude sub-categories
- tag: Enter a tag slug to display posts or products with that slug
- by-tags: set to “true” to display posts and WooCoomerce products by tags instead of categories
- exclude: Add page or post id’s to the exclude parameter to remove specific pages, posts or custom post type posts from the html sitemap output. Example:
[ uhs-sitemap exclude="23" ]
or[ uhs-sitemap exclude="23, 74, 12" ]
- cat-links: By default category titles will be linked to their corresponding category pages, to remove category links, simply use cat-links=”false”. Example:
[ uhs-sitemap cat-links="false" ]
- primary: (WooCommerce only) By default if you have any prodcuts with a Rank Math primary category set, that product will only show under its primary category, set primary to false to show products in all of their assigned categories
- columns: Set to false to show list in a single columns. Example:
[ uhs columns="false" ]