WordPress.org

Ready to get started?Download WordPress

Forums

Publish Category Posts with a future date (modify post.php) (3 posts)

  1. taylorswendsen
    Member
    Posted 7 years ago #

    I would like to alter the code in post.php (WP ver 2.2.1), but am not sure exactly how to do it. Here is the bit I want to alter:

    559 if ( 'publish' == $post_status ) {
    560 $now = gmdate('Y-m-d H:i:59');
    561 if ( mysql2date('U', $post_date_gmt) > mysql2date('U',$now) )
    562 $post_status = 'future';
    563 }

    Currently this bit of code checks to see if a post with a status of 'publish' has a date in the future. If it does, it changes the status to 'future'.

    What I would like to do is prevent this from happening in the case of a specific category. All categories would operate as normal, EXCEPT the category I select will never be stored in the database as 'future', but only as 'publish', 'draft' or 'private'.

    Any ideas?

  2. mjvillarejo
    Member
    Posted 6 years ago #

    hi, i've got same problem than you, did you get a fix for it?

    i was thinking about writing a plugin to make a query that change the "future" status for "publish" for some categories... what do you think?

    Regards,

    MV

  3. funjoy
    Member
    Posted 6 years ago #

    You can install the plugin "The Future is now"

    http://wordpress.org/extend/plugins/the-future-is-now/#post-2682

    It lets you set a "published" status to posts that have a future date

Topic Closed

This topic has been closed to new replies.

About this Topic