WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Changing Post Data with Function (3 posts)

  1. fatalx
    Member
    Posted 2 years ago #

    Hello,

    I would like to find out how I could change the post_status and post_date from inside a function (plugin).

    I have used wp_insert_post_data to edit the post_status and post_date before but now I need a scheduled event that will call a function and that function must change a posts status and date.

    Any idea how this could be done?

  2. NateJacobs
    Member
    Posted 2 years ago #

    You will want to research WordPress implementation of cron jobs. You can read how to schedule an event in the Codex.

  3. fatalx
    Member
    Posted 2 years ago #

    I ended up fixing my issue by using the $wpdb global and changing the post_status directly in the database. Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic