Forums

[Plugin: WP-o-Matic] Use feed date (2 posts)

  1. rlopes528
    Member
    Posted 2 years ago #

    From the WP-o-Matic help:
    ----------------------------------
    How it works
    To avoid incoherent dates due to lousy setup feeds, WP-o-Matic will use the feed date only if these conditions are met:

    First, of course, if the option is enabled in the campaign settings
    ->> The feed item date is not is not too far in the past (specifically, as much time as the campaign frequency)
    The feed item date is not in the future
    ----------------------------------

    The problem is that I am importing a feed with old post dates, so how can I make it keep the original dates? Maybe a simple hack on the code?

    http://wordpress.org/extend/plugins/wp-o-matic/

  2. Chris
    Member
    Posted 2 years ago #

    Hi,

    open wp-o-matic.php and search for:

    if($campaign->feeddate && ($item->get_date('U') > (current_time('timestamp', 1) - $campaign->frequency) && $item->get_date('U') < current_time('timestamp', 1)))

    change this line to:

    if($item->get_date('U') < current_time('timestamp', 1))

    Now it takes the original feed date as long as it is not a future date.

    -Chris

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags