wp_sitemaps_posts_show_on_front_entry filter-hookWP 5.5.0

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_Sitemaps_Posts::get_url_list()
wp_sitemaps_posts_show_on_front_entry
wp-includes/sitemaps/providers/class-wp-sitemaps-posts.php 145
$sitemap_entry = apply_filters( 'wp_sitemaps_posts_show_on_front_entry', $sitemap_entry );

Where the hook is used in WordPress

Usage not found.