As it is explained here
'wpseo_sitemap_' . $filter . '_change_freq'
the $filter
should be replaced with post type that you want to change, you can replace it with:
homepage
,
blogpage
,
$post_type . '_archive'
,
$post_type . '_single'
,
$c->taxonomy . '_term'
,
author_archive
.
while the $post_type
variable based on WordPress Codex can be replaced with:
- Post (Post Type: ‘post’)
- Page (Post Type: ‘page’)
- Attachment (Post Type: ‘attachment’)
- Revision (Post Type: ‘revision’)
- Navigation menu (Post Type: ‘nav_menu_item’)
at the end for single post your code should look like:
add_filter( 'wpseo_sitemap_post_single_change_freq', 'my_custom_post_freq', 10, 2 );
function my_custom_post_freq( $default, $url ) {
return 'hourly';
}
After adding this to your theme functions go back to Yoast Seo plugin back-end, disable XML sitemap functionality, save it, then re-enable and reload www.yoursite.com/post-sitemap.xml
Related Posts:
- Why do I get a 404 for my sitemap index after installing Yoast? [closed]
- When does the Yoast SEO filter hook wpseo_sitemap_urlimages fire?
- Yoast SEO creates sitemaps with a dash ‘-‘ but I can’t get Bing to accept them [closed]
- WordPress site running on Yoast not being indexed into Google News [closed]
- how to add urls dynamically into the sitemap
- Display Yoast WordPress SEO title in archive template
- How to add a page to the Yoast breadcrumbs
- How to print meta description to posts? [closed]
- Removing “Noindex, follow” from pages [closed]
- Change content language for one page
- Add Page number to Meta Description in WordPress SEO by Yoast [closed]
- Manipulating wp_head content
- Exclude custom post_type in sitemap generation?
- Yoast’s WordPress SEO plugin is not showing the correct snippet [closed]
- How do I get WordPress URL rewrites into Sitemap?
- Yoast Sitemap grouping external sitemaps [closed]
- XML Sitemap : broken XML file [closed]
- make the url unlimited
- Query Post Based of Yoast Primary Category Class
- Wrong Canonical url link
- How to parse Yoast SEO Snippet Variables
- Post content blank after disabling Yoast SEO
- With the Yoast SEO plugin, is it possible to make the meta description a required form field?
- WP-RestAPI and xml sitemap
- help to write a custom php script to settingup yoast priority to pages or posts
- robots.txt Not Updating
- Yoast Seo Plugin – Set no-index to a post automatically when a post is set to sticky [closed]
- Yoast SEO Plugin: Double Title isse [closed]
- Edit title-tag in wp_head with yoast seo
- Way to change the Yoast Schema depending on post type? [closed]
- Change base URL of Yoast Sitemap [closed]
- Variable focus word YOAST
- How can I add a second Open Graph image to a site using Yoast? [closed]
- WordPress Sitemap including pages that aren’t there
- How to call Yoast Seo Tags without needing to call the whole wp_head?
- My WordPress website has 2 header [closed]
- Add content before Yoast description
- Twenty Eleven Theme – SEO Yoast duplicate site titles
- Add Page number to Meta Description in WordPress SEO by Yoast [closed]
- Blog home page has canonical link that is incorrect. Do not see where to change this
- How to Modify Breadcrumb Page Names for Specific Pages? [closed]
- P3 Profiler and Yoast SEO plugin
- How to use the Yoast SEO wpseo_canonical filter to set a canonical URL for /, /au/ & /uk/ sites in a MU environment
- Yoast Metadata API to adjust/override the meta description
- Prevent Yoast from removing the canonical tag if robots meta tag is set to noindex [closed]
- Embed sitemap in a page
- Fixing link rel=”next” in Yoast SEO for paginated links
- how to disable Yoast SEO schema from homepage only?
- WPML and Yoast SEO setup on a wordpress site is not working properly
- Remove canonical link element from noindex pages
- What could be causing the category to be appearing as the post title in the title tag?
- Turn off auto 301 on archive pages? [closed]
- Yoast: do I still need to manually insert meta tags in my theme or will Yoast do this for me? [closed]
- Hard-code SEO Title defaults across all sites on a multisite
- WordPress site using Yoast SEO being blocked from indexing by robots.txt
- SEO Yoast Menu Not working
- Wrong Open Graph image is shown (og:image) using yoast
- An inactive plugin causes an HTTP 404 issue on a translated post – WPML
- Set default image for twitter cards with Yoast?
- Using $this with an anonymous function in filters
- Exclude WooCommerce terminations from YOAST
- Overwriting yoast’s og:meta output?
- Plugin scans for images in post_content, how about “featured image”?
- yoast seo plugin – remove bulk title and description editor menu from non-admins [closed]
- Yoast SEO makes repeated INSERT queries loading any page
- yoast sitemap xml
- Remove a specific sitemap from Sitemap_index.xml
- Yoasts plugin sitemap not detecting correct category URL format
- Using php to overwrite or replace title tag, while using yoast [closed]
- how can I check if I have sitemap?
- Inserting Post Using wp_insert_post. How to Fill Yoast Plugin SEO Fields
- add post content in meta description in yoast
- Yoast SEO breadcrumbs: how to create a filter that uses the url slug for breadcrumb titles
- Sitemap Page build from Menu?
- Using ‘Primary Category’ in URL
- Need Help Correct Regular Expression Redirect Code
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- WordPress appends RSS item with unwanted content
- Overwrite YoastSEO meta-tags with another page’s [closed]
- Customize title, description and focused keyword [closed]
- URLs with two taxonomies are missing from sitemap
- How can I change the tag contents of individual WordPress posts?
- Yoast SEO settings unavailable in an archive page from wordpress plugin
- Remove Yoast jQuery from front end
- Problem with parent page slug only in WordPress admin
- Google 404 Errors
- Exclude a specific page from WordPress sitemap. (wp-sitemap.xml)
- Yoast taking over my WordPress title tag [closed]
- WordPress yoast seo plugin – parse snippet var in meta description
- wp_get_canonical_url showing first url of the post for custom page
- Hide plugins and theme from public
- Subcategories randomly not working after page/post/category edit in wordpress. Fix: saving permalinks twice
- Yoast and permalink troubleshooting
- Show Yoast SEO meta tags in Custom WordPress Templates (Theme)
- Robots.txt file not updating
- How to display custom seo title before the loop?
- Facing Problem with Description in Post and Home Page in WordPress
- Mystery URL http://#/ Listed in XML Sitemap Created by WordPress SEO by Yoast Plugin
- How to clean up unnecessary file inside wp-content/plugins/wordpress-seo?
- TypeErrors with Yoast, jQuery in conflict?