WordPress.org

Ready to get started?Download WordPress

Forums

Cannot display single.php of a future (scheduled) post (1 post)

  1. idomaron
    Member
    Posted 1 year ago #

    Hello
    I am working with a child theme of twentyeleven.
    I would like to show also future post throughout my website.

    I was using:

    add_Action('pre_get_posts' , 'include_future_posts');
    
    function include_future_posts($query)
    {
        $query-> set('post_status', array('publish',  'future'));
    }

    and it works for category.php
    but not for single.php.

    Anyone has an idea?
    Thanks :))

Topic Closed

This topic has been closed to new replies.

About this Topic