• Resolved jarven

    (@jarven)


    I’m using post_status=”future” to show post which is scheduled in the future.
    URL to these posts will be like /?p=123 and when you to go these posts you will get 404.
    If I’m logged in it will work.

    Permalink is set to /%category%/%postname%/ and when I show posts with status “publish” url will be like /events/my-post

    Permalink works normal for the rest of the site.

    This is my shortcode;
    [display-posts include_date="false" date_format="d | m | y" category="events" image_size="large" wrapper="div" wrapper_class="display-posts-listing grid-small" posts_per_page="12" meta_key="_thumbnail_id" pagination="true" include_excerpt="true" include_excerpt_dash="false" post_status="future" no_posts_message="No Upcoming events right now!"]

    • This topic was modified 5 years, 2 months ago by jarven.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    WordPress core does not allow future dated content to be visible to logged out users.

    It looks like you’re implementing an event calendar. I recommend you do not use the post date as the event date. The post date should be the date the event was published on your website.

    Store the event date as metadata, then do a meta query that uses the event date. Examples:

    You might also take a look at BE Events Calendar, a plugin I use for creating an events calendar. I typically use this as a starting point and customize it as needed for the specific calendar we’re building. It’s not as feature rich as the other calendar plugins – it’s designed to be a barebones starter plugin.

    Thread Starter jarven

    (@jarven)

    Ah my mistake. I’m using posts as events and post date as the event date.
    I thought DP was a easy solution ??

    I will take a look at your suggestions.

    Thanks for great plugin!

    Thread Starter jarven

    (@jarven)

    Display upcoming events from The Events Calendar works fine using DP-plugin.

    Question is how to show past events from The Events Calendar using DP-plugin.

    I have one section with upcoming events and another one with past events.

    Thread Starter jarven

    (@jarven)

    Problem solved!

    Just for the record.
    1) I created a custom field to handle the date for the event.
    2) Added a shortcut argument which will handle “future” and “past”.
    3) Depending which value shortcut argument contains meta_query show past or future events.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Future status will give 404’ is closed to new replies.