You should be able to use this function to delay the RSS feed as long as you desire. (example, 48 hours or every two days)
// delay feed update
function publish_later_on_feed($where) {
global $wpdb;
if (is_feed()) {
// timestamp in WP-format
$now = gmdate('Y-m-d H:i:s');
// value for wait; + device
$wait="10"; // integer
// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
$device="MINUTE"; // MINUTE, HOUR, DAY, WEEK, MONTH, YEAR
// add SQL-sytax to default $where
$where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
}
return $where;
}
add_filter('posts_where', 'publish_later_on_feed');
Related Posts:
- Remove Actions/Filters added via Anonymous Functions
- How to restrict actions and filters “properly” by conditions
- Using add_filter() in Widgets
- Convert hyphen to underscore in permalinks
- How would go about if I just want a temporary function?
- Accepted arguments value in hook functions
- Which action hook to use for function?
- Modify a function without editing template
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Override the WordPress core function wp_referer_field
- login_headertitle is deprecated since version 5.2.0
- Insert Content Before div#main from the functions.php File
- Save_post – Warning: Cannot modify header information
- post value to function with Ajax and jQuery
- How Do I Unhook This Parent Theme Function?
- Which method is more correct for removing WooCommerce Extensions menu item?
- previous_post_link inside of a function?
- Settings in functions.php used by a plugin
- disable a specefic sidebar when user is log out
- Remove Actions/Filters added via Anonymous Functions
- remove empty paragraphs from the_content?
- remove_action on after_setup_theme not working from child theme
- Issues with title-tag and document_title_parts
- Trying to use add_action and do_action with parameters
- Set JPEG compression for specific custom image sizes
- Check if post is being published for the first time, or is an already published post being updated
- Define custom Page Template without its own .php file
- How to use the do_action () with parameter
- Add class to menu items of one specific menu (nav_menu_css_class)
- Perform an action when post is updated/published
- How to influence the information displayed on widget inside wp-admin
- WordPress Theme Update Action?
- Extract image from content and set it as the featured image
- Do WordPress’ cron’s clean up expired transients?
- Removing default image size list in Media Box
- add_action in a function, is it possible?
- Using a private method as an action callback from within a class
- How to publish a post with empty title and empty content?
- Refresh page after form action
- How to count number of functions attached to an action hook?
- Add action hook conditionally – only when home.php in use
- Filter the query ONLY for the search results page
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Customize WordPress Media Manager – Media Window
- How can I tell if I’m on a login page? [duplicate]
- How to reduce original image quality on upload?
- Is it possible to use a forgot password url filter?
- syntax for remove_filter in parent theme with class
- Add body class of category parent
- Wrap gutenberg block ‘div’ in other elements/extra HTML
- Change meta tags programatically
- Override parent theme function that is not hooked or in the functions.php file
- Remove Page Title from Static Frontpage
- Using get_terms for custom taxonomy in functions.php
- Programmatically Add Font-Awesome Icons to Category Widget
- Fatal error: Call to undefined function add_action() – an untouched problem
- Remove bulk actions based on user role or capabilities
- How to hook into the quick edit action?
- Default or Preset Content for Custom Post Types
- Reuse variable in hook callback
- Override a class function to include a custom template
- How to override filter in child theme?
- Call to undefined add_action() in theme’s functions.php
- Removing title from page
- Hide some items from Screen options in dashboard for products
- How to change a certain text or term of WordPress into a custom into the whole site?
- Adding body class when post contains a specific shortcode
- WooCommerce add_action hook results in 500 error
- Why do filters/actions require an argument count?
- Replace Archive Widget Link Text
- Exclude Empty Child Categories in Menu
- How to make unique add_filter to the_content of specific page template files – so each template gets its own addition
- Automatically Add Specified Value to Attachment Metadata upon Upload
- Best way to programatically add “rel” attributes to page and post images
- Can’t Update function.php after writing short code
- How to get Custom Post ID by adding filter to child theme’s function
- add_filter priority problem
- Limit filter upgrader_post_install to a single plugin
- Manipulate Output of wp_list_something: select menu instead of li’s
- Clean-up script tags
- How to use IF Statement in WordPress?
- Gravity Forms field entries into wp_query loop [closed]
- Post Pagination Showing Same Posts Every Page
- Show excerpt for only first post in query
- Remove function or filter
- modify a function filter
- Super simple shortcode not working
- Generating rel=prev and rel=next only on wordpress categories
- How to make applyFilters function return false via functions.php
- Passing arguments to my function with do_action and add_action is not working
- Pass parameters to function through an action
- How to filter out shortcode when displaying the_excerpt() in the loop?
- How to use return in my custom function instead of echo
- Get current page_id before loop, in functions.php
- How to select a page within admin?
- How to manage arrays from custom functions stored in functions.php?
- How do I pass arguments for multiple functions hooked to a single action?
- Adding multiple taxonomy filters to functions.php
- str_replace function in theme
- Custom HTML in specific category single page and its descendant categories