WordPress.org

Ready to get started?Download WordPress

Forums

Keep Posts Scheduled, But Visible (18 posts)

  1. Lenny
    Member
    Posted 4 years ago #

    Is it possible to make scheduled posts visible if you know the direct link?

    I have posts that are scheduled all the way into July of next year and I'm using a calendar and have listed them on the the calendar using the plugin called "events calendar". It creates a post for each calendar entry you make. So I edit the post and change the date to be published to the future.

    When someone clicks the event on the calendar - BAM - error message cause the event is scheduled for the future and not visible buy regular users.

    Any ideas?

  2. Lenny
    Member
    Posted 4 years ago #

    BTW I have started using a plugin called "Upcoming Scheduled Posts" and this works, but not exactly as I prefer it. This plugin makes a page that shows all scheduled posts - none of which are clickable or viewable beyond the title.

  3. Michael Fields
    Themer
    Posted 4 years ago #

    You'll most definitely want to use a plugin for this functionality. I know that it's tempting to try the old "Post it in the future and make it display live trick" but this is actually going against the grain of what the "Scheduled Posts" functionality is meant to accomplish.

    I post on a blog from time to time that uses the Events Calendar Plugin which seems to work pretty well. I have also seen a few other plugins that provide this functionality. It might be best to look them all over and pick the one best suited for your needs. This query will help.

    Best of luck,
    -Mike

  4. s_ha_dum
    Member
    Posted 4 years ago #

    What you seen to be wanting is to 'schedule' a post for the future but to still have it display as if it were not scheduled for the future? That's kinda contradictory.

    Maybe what you want is to publish the post but prevent it from showing up on the front page (maybe also category and tag archives pages) until a particular data has past? If you did that, the post would be visible if you knew the URL but would otherwise not show up anywhere. I think I'd use a custom meta field for that, then use query_posts to eliminate the 'future' posts from the pages I didn't want it on.

  5. Lenny
    Member
    Posted 4 years ago #

    @mfields I'm using the Events Calendar Plugin. The problem is that when users click on one of the events from the calendar and it's scheduled to be posted, they hit an error page because the page is scheduled to be published, not published currently.

    @apljdi Might be contradictory, but you dont know ones intentions - so you cant say that :) ... With that said - what you mentioned is exactly what I want to do. But the post is not visible even if you know the link - see my comment to mfields.

    Basically I'd just like that if the URL to the scheduled post is known, it could be accessed by clicking to it from something like Events Calendar or a URL posted elsewhere on the site.

  6. s_ha_dum
    Member
    Posted 4 years ago #

    Might be contradictory, but you dont know ones intentions - so you cant say that :)

    But my point was not to criticize what you want to do. I was just pointing out that you want to do it using a function that is designed to do something that is at least partially in conflict with your goal-- keep posts from being seen until a particular date. I think you should stop trying to do this with the built in scheduling because you are fighting the scheduling system by trying to do it that way. Assign a custom meta field of 'hide_until_date' or whatever you want. Then use query_posts in your scripts to prevent those posts from showing up until the 'hide_until_date' date, except on the single page. If you do that, you should get the functionality you are describing. Maybe Events Calendar is supposed to do that, and for some reason its not working in your case. I'm not sure.

    You could also, maybe, take the opposite approach and use query_posts in the single.php page to include posts marked 'future'.

  7. Michael Fields
    Themer
    Posted 4 years ago #

    @LBSources
    Sorry, I completely read your post wrong... I feel like an ass :) one thing I can't figure out is what you are trying to accomplish by setting the post to future? If you could explain, I might be able to help.

  8. I get it, I think.

    You want events to show up, with a related post, for upcoming 'events' (dates, same thing in my head right now). But if you use the WordPress scheduler, they don't show up.

    Can you relate posts from older dates to future events?

  9. s_ha_dum
    Member
    Posted 4 years ago #

    one thing I can't figure out is what you are trying to accomplish by setting the post to future?

    Ok, that wasn't clear. What I offered was two different solutions. The first is in the long paragraph and uses custom meta fields. The second solution is in the short paragraph and involves using the built in scheduling system but since doing that won't let you view posts marked 'future' (which is how scheduled posts are marked in the DB) you need to interrupt the query and get it to include, rather than exclude, posts marked 'future' so that links to future posts work. But you only want to do that when you are viewing a single post-- usually controlled by the single.php theme template.

  10. Lenny
    Member
    Posted 4 years ago #

    @Ipstenu Exactly..

    I don't use WP in the common way in the case of this particular site. I have a home page where there is a sidebar that shows upcoming Events (displayed by piping the events category into the query). When I dont schedule the posts (events) and post them immediately, they show up and the events never update in this sidebar. The scheduling allows me to schedule them and they update nicely in this sidebar.

    This works just fine - no problems here - so the scheduler is fine.

    The problem is that these events are on the calendar (posts are created when you create the event) and visible on the calender, but when clicked (to go to the post) - boom - error.. This is obviously because the posts are scheduled and not public yet - but when the scheduled date is met, of course the post is available.

    So on this site in particular - posts are always hidden. They can see the posts by visiting the calendar and clicking on an event. Typically if you showed all your posts that are scheduled, they may show up on your homepage - but I'm not using it as a typical WP site. I'm using it more as a website.

    So in short - I need to be able to show scheduled posts when accessed directly by the URL.

    Hope this helps.

  11. Michael Fields
    Themer
    Posted 4 years ago #

    So in short - I need to be able to show scheduled posts when accessed directly by the URL.

    Not necessarily... After hearing the whole situation, I think that it would be easier to modify the query that displays the posts in your sidebar. If you were to code the sidebar to query events from the calender plugin rather than directly from the posts table, you would not have to set the posts to future at all.

  12. Lenny
    Member
    Posted 4 years ago #

    @mfields This sounds like it would work - but what about pages where I list "Category = Events" .. They wont show up in correct order..

  13. Put the correct date in the title and sort by that?

    Stabbing in the dark.

  14. Michael Fields
    Themer
    Posted 4 years ago #

    @LBSources - Same solution. I'm not sure how you are listing the events on your pages, but more than likely it's some sort of custom query. As long as you change all the queries on your site that produce an events list, you should be fine and will never have to schedule event posts in the future.

  15. Michael Fields
    Themer
    Posted 4 years ago #

    @LBSources - just in case I misunderstood...

    @mfields This sounds like it would work - but what about pages where I list "Category = Events" .. They wont show up in correct order..

    Are you referring to viewing posts in a WordPress Category or do you have a WordPress Page which shows the events?

    What I wrote in my last post refers to a WordPress Page...

    In this situation, I would suggest not using the WordPress Category view at all. The calendar "page" that you set up with the "Event Calendar" plugin serves to replace this view with a custom interface. It should be pretty easy to redirect all requests to your events category with .htaccess

    This is what I would do... other than just removing all links to the events category from your site.

  16. 2046
    Member
    Posted 4 years ago #

    I have the same problem as LBSources
    I'm looking for this solution for month and still no luck, i think it has to be changed in the core, but where.. who knows?

  17. 2046
    Member
    Posted 4 years ago #

    to: mfields
    it won't work, the custom query is useless in this case, it works on index, month archive, if the month has past event but not in the day archive(when the day is in future)

    :(

  18. 2046
    Member
    Posted 4 years ago #

    I think you will love this plugin :)
    http://wordpress.org/extend/plugins/no-future-posts/

    it solves the problem for me, finally...sorry for the triple posts, but now we have solution :D

Topic Closed

This topic has been closed to new replies.

About this Topic