wp_sitemaps_posts_show_on_front_entry
Filters the sitemap entry for the home page when the 'show_on_front' option equals 'posts'.
Usage
add_filter( 'wp_sitemaps_posts_show_on_front_entry', 'wp_kama_sitemaps_posts_show_on_front_entry_filter' ); /** * Function for `wp_sitemaps_posts_show_on_front_entry` filter-hook. * * @param array $sitemap_entry Sitemap entry for the home page. * * @return array */ function wp_kama_sitemaps_posts_show_on_front_entry_filter( $sitemap_entry ){ // filter... return $sitemap_entry; }
- $sitemap_entry(array)
- Sitemap entry for the home page.
Changelog
Since 5.5.0 | Introduced. |
Where the hook is called
wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php 122
$sitemap_entry = apply_filters( 'wp_sitemaps_posts_show_on_front_entry', $sitemap_entry );