Sitemap Priority depend on post_type
-
Hi, need to set individual priority values for pages, posts, categories, tags, can you show an example how can i implement this?
this work fine but this work for all post type… Thanks for helpadd_filter( 'wp_sitemaps_posts_entry', 'add_sitemap_tags', 25, 2 ); function add_sitemap_tags( $entry, $post ) { $entry[ 'priority' ] = '40%'; $entry[ 'changefreq' ] = 'Monthly'; $entry[ 'lastmod' ] = $post->post_modified_gmt; return $entry; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Sitemap Priority depend on post_type’ is closed to new replies.