Display a future custom post type page without being logged in (3 posts)

  1. Jack Barham
    Posted 4 years ago #


    I am making a simple events based website and to keep things simple (as my PHP is limited) I would like to use the post date to display future posts (which are setup as a custom post type) to display the page for that future post.

    I have installed 'The Future is Now' plugin (I am wondering is this works for custom post types?) and I have successfully pulled in future event summary information onto a single page but when you click on to that page you can only see it when you are logged in.

    This is pulling a summary of previous event dates:
    http://joof.airboxmedia.com/pastdates/ - When you click on an event, all is good :)

    This is pulling a summary of future event dates:
    http://joof.airboxmedia.com/tourdates/ - When you click on a date, all is bad :(

    I pulled in the future information using:
    '<?php $loop = new WP_Query( array( 'post_type' => 'tourdates', 'orderby' => 'date', 'order' => 'asc', 'posts_per_page' => -1,'post_status' => 'future') ); ?>
    <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>'

    If this works the idea is all past and future dates will display on the correct summary page according to the current date.

    Is there anyone that can help or at least point me in the right direction ..?

    Thanks - Jack

  2. Jack Barham
    Posted 4 years ago #

    Actually, I cheated and used jQuery toggle to display and hide the full event information.

    It does seem weird that I am able to pull in future event (or post) information to a general page without being logged in but not able to actually able to view the specific page itself.

    I am building more sites like this one so any pointers would be helpful as I am still keen to find out :)


  3. nothin7
    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic