How to delay WordPress RSS feed publishing time

RSS(Rich Site Summary) allows a blogger or publisher to aggregate updates from their favourite site and post them on WordPress sites. Once configured, these feeds automatically post updates to your site. Although the process is automatic, you can always postpone RSS feed publishing time to validate the content before reaching your audience. This article shows you how to delay the RSS feed publishing time.

Configuring RSS feed publishing time

Always perform a backup before you make any changes to the theme files. If you break any codes, it will be easier for you to revert your site to its last good known state. Alternatively, you could also create a child theme. Read this link on how to create a child theme: https://www.a2hosting.com/blog/wordpress-child-theme/  

To edit your Theme setting file to extend the RSS feed publishing time, follow the steps below :

  1. Log in to your WordPress site with an administrator account.
  2. On the Dashboard in the left sidebar, click Appearance, and then click Theme Editor:

    You can always use the default editor for the theme. This article will use the Theme Editor Plugin to edit the theme files. Refer to this link to install Theme Editor plugin:  https://wordpress.org/plugins/theme-editor/
  3. On the Theme Editor, select the Theme you want to edit from the dropdown: 

  4. The files for this selected theme is listed on the right column under Theme Files: 

  5. Click on the file named “functions.php”:

  6. Insert the following code at the end of functions.php:

     

    function extend_rss_time_frame($where) {
    
      global $wpdb;
    
    
      if (is_feed()) {
    
        $now = gmdate('Y-m-d H:i:s');
    
        $wait = '100'; //extend by 100 minutes
    
        $device = 'MINUTE';
    
        $where.=" AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
    
      }
    
      return $where;
    
    }
    
    
    add_filter('posts_where', 'extend_rss_time_frame');
    
    

  7. Save the file and exit the editor. 
  8. The login session is now extended by 1 year instead of the default session by the login session cookie.

More Information

For more information about the please visit the following link:https://wordpress.org/plugins/theme-editor/

Get WordPress Hosting

Article Details

Other Articles in This Category

Show More

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.