Title: Priority and Frequency
Last modified: June 12, 2024

---

# Priority and Frequency

 *  Resolved [emmanuelok](https://wordpress.org/support/users/emmanuelok/)
 * (@emmanuelok)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/priority-and-frequency/)
 * Hi, I need help with the right filter to enable priority and frequency to the
   sitemap.
 * I tried the below snippets and they are not working.
 * /**
    - Modify the sitemap entry to include changefreq and priority.
      *
    - [@param](https://wordpress.org/support/users/param/) array $url Array of URL
      parts.
    - [@param](https://wordpress.org/support/users/param/) string $type URL type(
      post, user, or term).
    - [@param](https://wordpress.org/support/users/param/) object $object Data object
      for the URL.
      */add_filter( ‘rank_math/sitemap/entry’, function( $url, $type,
      $object ) {if ( $type === ‘post’ ) {$url[‘changefreq’] = ‘weekly’; // Set 
      your desired frequency$url[‘priority’] = ‘0.8’; // Set your desired priority}
      elseif ( $type === ‘page’ ) {$url[‘changefreq’] = ‘monthly’;$url[‘priority’]
      = ‘0.6’;} // Add more conditions for other types if needed// if ( $type ==
      = ‘custom_post_type’ ) {// $url[‘changefreq’] = ‘daily’;// $url[‘priority’]
      = ‘0.9’;// } return $url;}, 10, 3 );

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Rank Math Support](https://wordpress.org/support/users/rankmathsupport/)
 * (@rankmathsupport)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/priority-and-frequency/#post-17821845)
 * Hello [@emmanuelok](https://wordpress.org/support/users/emmanuelok/),
    Thank 
   you for contacting Rank Math support. You can’t change the priority or update
   frequency of the sitemap. There is no filter for that. The sitemap is generated
   dynamically and updated every time you publish or update a post. The sitemap 
   needs to be updated to improve the crawling frequency of your site. If your sitemap
   is not being updated, then it might be cached. You can follow this guide to exclude
   it from cache: [https://rankmath.com/kb/exclude-sitemaps-from-caching/](https://rankmath.com/kb/exclude-sitemaps-from-caching/)
   Hope that helps and please do not hesitate to let us know if you need our assistance
   with anything else.
 *  Thread Starter [emmanuelok](https://wordpress.org/support/users/emmanuelok/)
 * (@emmanuelok)
 * [1 year, 12 months ago](https://wordpress.org/support/topic/priority-and-frequency/#post-17826479)
 * [@rankmathsupport](https://wordpress.org/support/users/rankmathsupport/)
 * I am talking about adding the Priority and Frequency Tag.
 *  Plugin Support [Rank Math Support](https://wordpress.org/support/users/rankmathsupport/)
 * (@rankmathsupport)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/priority-and-frequency/#post-17834615)
 * Hello [@emmanuelok](https://wordpress.org/support/users/emmanuelok/),
    We currently
   don’t have a filter to modify the mentioned tags for our sitemaps. Don’t hesitate
   to get in touch with us if you have any other questions.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Priority and Frequency’ is closed to new replies.

 * ![](https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330)
 * [Rank Math SEO – AI SEO Tools to Dominate SEO Rankings](https://wordpress.org/plugins/seo-by-rank-math/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/seo-by-rank-math/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/seo-by-rank-math/)
 * [Active Topics](https://wordpress.org/support/plugin/seo-by-rank-math/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seo-by-rank-math/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seo-by-rank-math/reviews/)

## Tags

 * [sitemap](https://wordpress.org/support/topic-tag/sitemap/)

 * 3 replies
 * 2 participants
 * Last reply from: [Rank Math Support](https://wordpress.org/support/users/rankmathsupport/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/priority-and-frequency/#post-17834615)
 * Status: resolved