Blocks
lh-html-sitemap/sitemap: dynamic block, one per page. AttributeshowTaxonomies(boolean, default false). Logged-out visitors get a render of the public statuses, stored in the object cache (grouplh_html_sitemap) under a key built from the attributes, the public statuses, the per-type cap andwp_cache_get_last_changed( 'posts' )(plus'terms'when taxonomies are shown), so it refreshes itself when content changes. Logged-in users get a live render on every request, never cached, and the block fireslitespeed_control_set_nocacheso LiteSpeed does not cache that page.lh-html-sitemap/sitemap-link: dynamic Navigation child block (parentcore/navigation, listed throughblock_core_navigation_listable_blocks). Attributelabel(default “Sitemap”). Links to the sitemap page and renders nothing while there is none.
Sitemap page
When a published post containing the Sitemap block is saved (wp_after_insert_post), its ID is stored in the option lh_html_sitemap-page_id; it is removed when that post is saved without the block or unpublished. Every read re-checks that the stored post is still published and still has the block.
Filters
lh_html_sitemap_return_public_statuses: statuses listed for logged-out visitors (defaultpublish). A plugin that registers a status visitors can view, such as an archived status, adds it here.lh_html_sitemap_return_logged_in_statuses: statuses queried for logged-in users (default: every non-internal, non-protected status plus the public ones). Posts outside the public statuses must also passcurrent_user_can( 'read_post' ).lh_html_sitemap_return_post_types: post types listed, applied after core’swp_sitemaps_post_types.lh_html_sitemap_return_taxonomies: taxonomies listed when enabled, applied after core’swp_sitemaps_taxonomies.lh_html_sitemap_return_items_per_type_cap: items per post type or taxonomy before an archive link is shown (default 200).lh_html_sitemap_get_excluded_post_ids: post IDs never listed (default: WooCommerce cart, checkout and account pages).lh_html_sitemap_post_type_query_args: theget_posts()arguments per post type; also receives the post type object and whether the render is for a logged-in user.lh_html_sitemap_get_sitemap_page_id: the sitemap page ID used by the link block and menus.lh_html_sitemap_sitemap_block_name,lh_html_sitemap_sitemap_link_block_name: the block names.lh_html_sitemap_init_plugin: return false to stop the plugin loading.
Classic menus
With LH Dynamic Menu Items active, an “HTML Sitemap” item (#lh_html_sitemap-site_map-link#) is offered for classic menus, through lh_dmis_return_menu_array and lh_dmis_switch_item. It points to the sitemap page, and is left unchanged while there is none.