WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] Show 5 most recent events in reverse order? (7 posts)

  1. GoodUtopian
    Member
    Posted 1 year ago #

    HI, I'm trying to display a list of the 5 most recent events using shortcodes:

    Recent events:
    [eo_events event_end_before="today" numberposts="5"]

    But this is showing the FIRST five events in chronological order, when what I want is the most recent five events in reverse chron order. I can't figure out how to do this -- is there a way?

    Thank you!
    A

    http://wordpress.org/extend/plugins/event-organiser/

  2. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    So you want to show past events, but only the last 5?

    Try

    [eo_events event_end_before="today" numberposts="5" order="DESC"]

    By default it sorts by the start date, so you may wish to sort by end date. See the docs for more information.

    Hope that helps!

  3. GoodUtopian
    Member
    Posted 1 year ago #

    Thanks so much for responding, but this doesn't work. When I did this, it gave me all recent posts in ascending order (starting with the date farthest in the past). I copied the code directly. Any other thoughts?
    Thanks!
    Anna

  4. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    That's odd. Its definitely working for me. What happens if you change "DESC" to "ASC" - does the order change? If not, it sounds like maybe a plug-in interfering with the query - could you try disabling all other plug-ins and switching your theme to TwentyEleven/Twelve just to check ?

  5. GoodUtopian
    Member
    Posted 1 year ago #

    Thank you! I cleaned up my plug-ins, and it works perfectly. Much appreciated!

  6. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    Which was the offending plug-in? I can take a look, and let the plug-in author know - so others won't have the same problem!

  7. GoodUtopian
    Member
    Posted 1 year ago #

    you know, i wasn't scientific about it -- i had a couple that were deactivated, which i deleted, and i had a couple that were active but i wasn't using them -- i think the latter were jetpack and something about parallel loading that i don't recall ever installing ....

    next time, i'll be more methodical, so i can be of help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic