Download the PHP package bigfork/wp-html-sitemap without Composer

On this page you can find all versions of the php package bigfork/wp-html-sitemap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-html-sitemap

HTML Sitemap

A configurable HTML sitemap for WordPress. Respects noindex settings from your SEO plugin without depending on it, and renders per language on WPML and Polylang sites.

Installation

Activate HTML Sitemap, configure it under Settings → HTML Sitemap, then add the shortcode to a page:

Shortcode

Attribute Example Description
types types="page,post" Only these post types. Uses their settings even if disabled.
taxonomies taxonomies="category" Only these taxonomies.
exclude exclude="12,34" Extra post IDs to leave out.
heading_level heading_level="3" Section heading level, 1–6. Defaults to 2.

Passing either types or taxonomies switches to explicit mode: only what you list is shown, e.g. [html_sitemap types="page"] shows pages and no taxonomies.

Sections

Each post type and taxonomy forms a section. Give each one a heading and a Position in settings; lower positions come first.

What gets left out

An item is excluded when any of these apply:

Children of an excluded page or term are hidden too. Untick Also hide children of excluded pages and terms to promote them a level instead.

The Sitemap column on post list screens shows whether each post is listed, and why not.

SEO plugins

Only noindex detection touches the SEO plugin. Titles and URLs come straight from WordPress, so the sitemap keeps working if you switch or remove SEO plugins.

Built in: Slim SEO, Yoast SEO, Rank Math. Auto-detected, or pick one (or ignore them) in settings.

Add your own by implementing Bigfork\HtmlSitemap\Seo\NoindexProvider:

Multilingual

WPML and Polylang are detected automatically:

Post types and taxonomies

Any public post type or taxonomy with front-end URLs (is_post_type_viewable() / is_taxonomy_viewable()) is offered in settings. Hide ones that are only data models, for example a third-party plugin's CPT that is registered as public for no reason:

Caching

Rendered output is cached in a transient (object cache when available) for a day, and invalidated whenever posts, terms, sitemap settings, permalinks or SEO settings change.

Pages containing the shortcode are purged from WP Rocket, LiteSpeed Cache, W3 Total Cache and WP Super Cache on invalidation. Hook other page caches via bf_html_sitemap_purge_post.

Those pages are found when posts are saved, by looking for [html_sitemap in post content and post meta, so shortcodes in ACF fields (including flexible content) are picked up. If the shortcode lives somewhere else, such as an ACF options page or a do_shortcode() call in a template, add the page IDs yourself:

Structured data

Tick Output schema.org SiteNavigationElement JSON-LD to append an ItemList of SiteNavigationElements to the sitemap. It is kept separate from your SEO plugin's schema graph. Adjust it with bf_html_sitemap_schema.

Templates

Copy templates/sitemap.php and/or templates/list.php to your-theme/html-sitemap/ to override the markup. No CSS is included; style the BEM classes (.html-sitemap, __section, __heading, __list, __item, __link).

Hooks

Hook Type Purpose
bf_html_sitemap_available_post_types filter Post types offered in settings, keyed by name
bf_html_sitemap_available_taxonomies filter Taxonomies offered in settings, keyed by name
bf_html_sitemap_post_query_args filter Modify the WP_Query args per post type
bf_html_sitemap_term_query_args filter Modify the get_terms() args per taxonomy
bf_html_sitemap_exclude_post filter Return true to exclude a WP_Post
bf_html_sitemap_exclude_term filter Return true to exclude a WP_Term
bf_html_sitemap_schema filter Modify the JSON-LD data
bf_html_sitemap_sections filter Modify, reorder or add sections before rendering
bf_html_sitemap_template filter Change the template file path
bf_html_sitemap_noindex_providers filter Register SEO providers
bf_html_sitemap_noindex_provider filter Override the resolved SEO provider
bf_html_sitemap_language_providers filter Register multilingual providers
bf_html_sitemap_pages filter Page IDs to purge from page caches on invalidation
bf_html_sitemap_cache_enabled filter Return false to disable caching
bf_html_sitemap_cache_ttl filter Cache lifetime in seconds
bf_html_sitemap_flushed action Fired after the cache is invalidated
bf_html_sitemap_purge_post action Purge a sitemap page from a custom page cache

WP-CLI

Uninstalling

Deleting the plugin removes its settings, cached output and every exclude flag on posts and terms (across all sites on multisite).

Development


All versions of wp-html-sitemap with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
composer/installers Version ^2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bigfork/wp-html-sitemap contains the following files

Loading the files please wait ...