WordPress.org

Support

Support » Plugins and Hacks » FeedPress » [Resolved] What triggers Feedpress ping?

[Resolved] What triggers Feedpress ping?

  • I run a blog where I post daily items based on the day in history (http://thisdayintechhistory.com). I like to refresh the posts for each day by updating the posts with the currently year so that the items for that day show up on top, plus the RSS feed is refreshed so that the items are sent out every day (plus posted to Facebook, etc.). I finally figured out a way to automate to process by running a cron job of a mysql command (instead of manually updating each post every day!). However, it seems that my mysql command does not trigger the Feedpress plugin to ping an update. I would like to know if there is a simple way to do this, or to schedule Feedpress to automatically update the feed.

    Here is my mysql command for reference:

    UPDATE wp_posts SET post_date_gmt = concat(UTC_DATE(),’ ‘,time(post_date_gmt)), post_date = concat(CURDATE(),’ ‘,time(post_date)), post_modified = NOW(), post_modified_gmt = UTC_TIMESTAMP() WHERE MONTH( post_date ) = MONTH( CURDATE( ) ) AND DAYOFMONTH( post_date ) = DAYOFMONTH( CURDATE( ) ) AND post_status = ‘publish’

    Thanks!

    http://wordpress.org/plugins/feedpress/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Update: I also added this mysql command

    INSERT INTO wp_postmeta (post_id,meta_key,meta_value) SELECT id,'_pingme','1' FROM wp_posts WHERE MONTH( post_date ) = MONTH( CURDATE( ) ) AND DAYOFMONTH( post_date ) = DAYOFMONTH( CURDATE( ) ) AND post_status = 'publish'

    From what I understand, the next time a page is loaded, the rows added by this command which include the _pingme field will trigger a ping. Am I correct?

    Plugin Author maximevalette

    @maximevalette

    Hi Marcel,

    Thanks for your interest in FeedPress!

    If you do raw MySQL requests WordPress can’t trigger the events.

    Instead of the MySQL request you may take a look at the wp_update_post function. You can easily update the post date with that.

    I figured out a way to do this with a combination of SQL statements and some PHP code. I’ll post the details soon. Thanks!

    I blogged about this little project here. I mention FeedPress in it extensively.

    Automate Recycling WordPress Posts on a Yearly Basis

    I wouldn’t mind someone looking over my code and advising me on a better way to do it so I can learn. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] What triggers Feedpress ping?’ is closed to new replies.
Skip to toolbar