How to list 3 "unique" upcoming events, excluding past events

Home Forums Calendar Products Events Calendar PRO How to list 3 "unique" upcoming events, excluding past events

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46617
    storlihoel
    Participant

    hi there.
    Im trying to do this:
    * Display 3 upcoming events
    * Order them by unique names of events
    The idea is basically to prevent the site from displaying the same thumbnails / same event-titles. This is hard, since I don’t use categories.
    Since I’m using recurring events, I end up getting the same event 3 times.
    Here’s the code I have now: http://pastebin.com/a1hKQEn9
    Help is greatly appreciated.

    #46645
    Barry
    Member

    You could try using tribe_get_events() instead of a “raw” WP_Query. It essentially accepts the same arguments and a few new ones, so it’s possible that it the only change you need here (but if not let me know and I’ll take a closer look).

    #46647
    storlihoel
    Participant

    Can you provide an example, based on my code? I have tried a bunch of different ways, over a course of many days, but no success yet. So, an example from a experienced developer will be greatly appreciated.

    #46961
    Barry
    Member

    This gives an example of using tribe_get_posts() – can you try tweaking that to fit your requirements?

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to list 3 "unique" upcoming events, excluding past events’ is closed to new replies.