-
Hello,
I’m using the Rank Math plugin for my WordPress website and would like to change the <priority> value for all posts in the sitemap from the default (0.10) to 0.80.
I’ve tried using the following hook:
add_filter(‘rank_math/sitemap/priority’, function($priority, $object_type, $object_id) {
if ($object_type === ‘post’) {
return 0.8;
}
return $priority;
}, 10, 3);
However, the priority value in the sitemap did not change. I also cleared all caches (Rank Math cache, site cache, browser cache), but it still shows 0.10.Could you please advise the correct method or hook to use in order to modify the priority for posts in the sitemap?
Thank you in advance for your help!
The ticket ‘priority’ is closed to new replies.