Wordpress Tutorials

How to Change Sitemap frequency in WordPress SEO by Yoast Plugin

Written by Aryan

Have you ever wanted to Change Sitemap frequency in WordPress Yoast SEO plugin? Your Blog post is not indexing or taking so many days to appear in Search Engine? Often those who use WordPress to create a blog, also install the plugin “WordPress SEO by Yoast” that works to improve your WordPress blog in terms of SEO. Among the services free you can create a sitemap and then submit it to various search engines like Google and Bing. In this Article, I am going to show you How you Can Change the Frequency rate Weekly to Daily for your Posts.How to Change Sitemap frequency in WordPress SEO by Yoast plugin

Change the refresh Frequency rate from the sitemap WordPress SEO by Yoast

With the free version of the WordPress SEO plugin, you can not choose the refresh rate of the articles, pictures, archives, or why you should switch to another plugin or find a workaround for this problem that in most cases lead to entrust another plugin create the sitemap.

This article will explain how to change the refresh Sitemap Priority rate of the sitemap plugin WordPress SEO by Yoast without touching the plugin.

How to Change Sitemap frequency in WordPress SEO by Yoast pluginChange Sitemap Frequency in XML Sitemap Yoast

To change the refresh rate must interact with the WordPress SEO plugin, but we should not touch any of the folder / plugins /. To change how often you will need to limit yourself to add a filter in functions.php file of the theme, you are using WordPress.

A “filter” to change the Frequency index time of the sitemap

The filter table is going to replace  wpseo_sitemap_ ‘. $ Filter. ‘_change_freq  , where instead of the variable  $ filter  must specify whether it is the home page, an article or something else:

  •  homepage  last added post in homepage
  •  blogpage  blog pages
  •  author_archive  archive of authors
  •  $post_type . '_archive'  the term of $post_type
  •  $post_type . '_single'  the term of $post_type
  •  $ Taxonomy. '_term'  the term of $ taxonomy

If you want to change the refresh rate of the articles on the home page, then the variable  $ filter  match “homepage”, if you want to change the frequency of the items in the archive of the post type “events” then  $ filter  will equal “eventi_archive “…

The types of frequency that can be associated to each filter are:

  • always
  • hourly
  • daily
  • weekly
  • monthly
  • yearly
  • never

As you know, the WordPress plugin SEO divides the sitemap into sub-maps so you’ll have the sitemap for the articles, the site map for the pages, the sitemap for categories, and so on. We see precisely how to change the “frequency” of each type of sitemap with a few practical examples:

Frequency for Homepage Post or Articles

To change the frequency of the items you have to use  $ post_type. '_single'  to be replaced with 'post_single' .

Copy and Paste the Code in functions.php of Your theme.

Not found functions.php??

Go to File Manager>WP-contents>themes>your theme>functions.php

Php Code to Change Sitemap Frequency in Yoast SEO


Copy the code and paste in the functions.php of the theme.

Add Code and Save Functions php

Copy the Code Now.

[php] add_filter( ‘wpseo_sitemap_post_single_change_freq’, ‘custom_post_single_freq’, 10, 2 );
function custom_post_single_freq( $default, $url ) {
return ‘daily’;

Frequency of an archive and related articles

Suppose you have created the custom post type “events” and we want to change the frequency of the archive is “events” that the relevant articles. So we’re going to use  $ post_type. '_archive'  to be replaced with  'eventi_archive'  and  $ post_type.'_single'  to be replaced with  'eventi_single'.  In this case the results will be visible in the sitemap events-sitemap.xml

Paste the Code in functions.php of Your theme.

Paste in the functions.php of the theme.

[php] add_filter( ‘wpseo_sitemap_post_single_change_freq’, ‘custom_post_single_freq’, 10, 2 );
function custom_post_single_freq( $default, $url ) {
return ‘daily’;

Frequency of the terms of a taxonomy

Let’s assume that in my cooking blog has created the taxonomy “menu” and who wants to change the term frequency (term) associated. The deadlines are the voices, such as “starter”, “first course”, “sweet” …
We use  $ taxonomy. '_term'  to be replaced with  'menu_term'

[php]add_filter( ‘wpseo_sitemap_menu_term_change_freq’, ‘custom_menu_term_freq’, 10, 2 );
function custom_menu_term_freq( $default, $url ) {
return ‘hourly’;

Yoast xml sitemap not working?

If Your SEO sitemap is not working and you are getting error404. Then Uncheck and save the settings and again Check the Box and Click save Changes. It will Update Your Sitemap and will start working.

Here is the Step.

  1. Click on SEO and Select XML SitemapsYoast by Seo Sitemap setting
  2. Uncheck the Checkbox and Click Save Changes.Uncheck and Save XML Yoast sitemap
  3. Again, Check the Box and It will Generate Yoast SEO XML SITEMAP. You can Access Your sitemap from that little pop box or direct from urlsite.com/sitemap_index.xmlGenerate Create XML Sitemap

The guide to change the frequency rate of the Sitemap created with WordPress SEO plugin by Yoast is over. If you need to change a frequency or refresh rate and do not know how to do, leave a comment below😉

If you’ve, any additional tips don’t forget to mention it out in the comment section. Don’t forget to share this awesome article with your online friends and followers.

[Total: 5    Average: 3.8/5]

About the author


Aryan Raj is a 16 years old Web designer, Techpreneur and the founder of
TechCrax, I love writing all about technology including web apps, tech trends and the latest Buzzes all over the world. I am an avid blogger and a Passionate writer. You can Email me For SEO & Other Digital Marketing Services.

Sort by:   newest | oldest | most voted
Vivek sinha

Its working bro, Thank you so much. You Have saved my time.

Rajat Raj

Great bro. 100% working code to Change Frequency Rate in Sitemap.