Horje

Delay the public posting to RSS Feed

Just copy and past following codes to yourdomain.com/wp-content/themes/activated-theme/fucntions.php in the most below.
Example: PHP
// Delay feed update
function publish_later_on_feed($where) {
    global $wpdb;

    if (is_feed()) {
        // Timestamp in WordPress 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 syntax to default $where
        $where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
    }
    return $where;
}
add_filter('posts_where', 'publish_later_on_feed');



Single Articles
Delay the public posting to RSS FeedWordpress RSS Shortcode


Related Articles
How to Delay the public posting to RSS Feed Wordpress RSS Shortcode

Type:
Php
Category:
Web Tutorial
Sub Category:
Wordpress RSS Shortcode
Uploaded by:
Admin