WordPress.org

Ready to get started?Download WordPress

Forums

Allow non-logged in users to see future posts (1 post)

  1. chrizbo
    Member
    Posted 2 years ago #

    I have been able to list out pages that are set for future in a custom template like this:

    query_posts('post_type=page&post_status=future&posts_per_page=100&order=asc&orderby=date&meta_key=_wp_page_template&meta_value=show.php');

    However, when I try to then click on one of the pages listed there I get a 404 (as a non-logged-in user).

    How do I alter a thematic page.php template to show a future page?

    We are already using a bunch of things in function.php and have a special page template for this particular type of post...

    I tried adding the following to the functions.php with add_filter, but it didn't help:

    function show_future_where($where) {
    	return $where . ' AND (wp_posts.post_status = \'publish\' OR wp_posts.post_status = \'future\')';
    }

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags