WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how to show a future post from single.php template (2 posts)

  1. tango
    Member
    Posted 6 years ago #

    Hello,

    I'd like to show a future post from the single.php template. I've tried by modifying the query_string and adding post_status=publish,future but no success.

    It seems that the filter is applied earlier, probably in the query.php.

    Any help?

    Thanks, Sergio

  2. tango
    Member
    Posted 6 years ago #

    found the solution from another post. In query.php (line 1284), change:

    if ( ('publish' != $status) ) {
          if ( ! is_user_logged_in() ) {

    to

    if ( ('publish' != $status) ) {
       if ('future' == $status) {$this->is_preview = true;}
        else if ( ! is_user_logged_in() ) {

Topic Closed

This topic has been closed to new replies.

About this Topic