WordPress.org

Ready to get started?Download WordPress

Forums

Calendar: only show future posts (5 posts)

  1. Mannie Schumpert
    Member
    Posted 4 years ago #

    I'm using a WordPress installation as an event calendar only. I've had no problem tweaking the loop to only show future posts, but I can't seem to get the calendar to do the same.

    Since it's only acting as an event calendar, my intention was just to hard-code the calendar to show future posts instead of using plugins. In the get_calendar function in general-template.php, I changed the "post_status" instances from 'publish' to 'future', but the calendar isn't showing posts.

    The "// Get the next and previous month.." section seems to be working, as the month links appear as expected for future posts. It seems like the "// Get days with posts" section is where the problem is, but I can't sort it out.

    Is there something I'm missing?

    (BTW, the site in question is http://dayspringfellowship.org/calendar.)

  2. Mannie Schumpert
    Member
    Posted 4 years ago #

    Nevermind, I think I'm abandoning this approach altogether!

  3. shakingpaper
    Member
    Posted 3 years ago #

    Any chance you could share the code you are using to only show future posts in your loop (and can it be archived/paginated?)

  4. yochee
    Member
    Posted 3 years ago #

    like always the mods will close this thread and somebody will open a new one about this. i hate that. why is it so hard to resolve such an theroretically easy task? because the community doesnt work together on this.. now we have like 20 calendar plugins, just because wordpress doesnt do, what the users want. damn that!

  5. yochee
    Member
    Posted 3 years ago #

    @ shakingpaper: delete in general-template.php (WP 3.0.5):

    2x around line 1120 ($back $previous in calendar),
    1x line 1186 (current day)

    AND post_status = 'publish'

    now the navbars of the calendar appear when u have posts in the future, and a link to today (line 1186).

    Can anybody help to make a filter from this for functions.php?

    Maybe this could be a starting point for a nice workaround.

Topic Closed

This topic has been closed to new replies.

About this Topic