Sitemap Priority Filter – Bug?
-
Hi there,
I can’t tell if this is a bug, or if I have implemented the following code incorrectly. For clarity, I’ve added this to the end of my theme’s functions.php file:
add_filter( ‘wpseo_xml_post_type_archive_priority’, ‘my_custom_post_type_archive_xml_priority’, 10, 3 );
function my_custom_post_type_archive_xml_priority( $return, $type, $post) {
if ($type == ‘news’)
$return = 0.8;
return $return;
}I would expect that to override the Priority for ‘news’ on the category sitemap: http://www.flickreel.com/category-sitemap.xml – but it would appear that it has no effect. In fact, having tried all of the code in this tutorial (under the heading ‘Change Yoast SEO Sitemap Priority’): http://chykalophia.com/wordpress/change-yoast-sitemap-frequency-and-priority/ – nothing on there seems to have any effect.
Not being able to manually set the priority(/frequency) of category pages, etc. within the WordPress SEO plugin settings does seem to be quite a severe limitation with the plugin. Google appears pretty confused with the way that it displays deep links for the site (when it does actually show them). Often prioritising a page such as ‘Contact’ over a page such as ‘News’ or ‘Reviews’, which obviously isn’t ideal.
Thanks for any help,
Theo.
The topic ‘Sitemap Priority Filter – Bug?’ is closed to new replies.