• Hi everyone!
    I’ve been trying to make my wordpress installation list scheduled posts in the archives page but if I visit my archives page at a future month It shows me the 404 page.

    I tried adding this to my functions.php but it didn’t work.

    <?php
    add_filter('getarchives_where', 'add_future_events' );
    function add_future_events()
    {
    	if (is_archive())
    	{
    		return $x . " AND $wpdb->posts.post_status != 'draft'";
    	}
    }
    ?>

    I also modified the wp_get_archives function with this:
    $where = apply_filters('getarchives_where', "WHERE post_type = 'post' AND post_status != 'draft'", $r );

    didn’t work either.

  • The topic ‘Archives for future posts’ is closed to new replies.