• If you want to make your posts into calendars this is perfect, you have to figure to display your posts in the future for public users but that can be done by functions.php edit

    Thank you nice and simple!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    Please could you share code at functions.php to display your posts in the future for public users?
    Thanks,
    Ana

    Thread Starter nemanja.radevic

    (@nemanjaradevic)

    //future posts display
    add_filter(‘the_posts’, ‘show_future_posts’);

    function show_future_posts($posts)
    {
    global $wp_query, $wpdb;

    if(is_single() && $wp_query->post_count == 0)
    {
    $posts = $wpdb->get_results($wp_query->request);
    }

    return $posts;
    }

    Thank you very much!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Works out of the box’ is closed to new replies.