PHP code example of bigfork / wp-html-sitemap

1. Go to this page and download the library: Download bigfork/wp-html-sitemap library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bigfork / wp-html-sitemap example snippets


add_filter('bf_html_sitemap_noindex_providers', fn (array $providers) => [...$providers, new MySeoProvider()]);

add_filter('bf_html_sitemap_available_post_types', fn (array $types) => array_diff_key($types, ['team_member' => true]));

add_filter('bf_html_sitemap_pages', fn (array $ids) => [...$ids, 42]);