Custom loop to display expired events

Home Forums Calendar Products Events Calendar PRO Custom loop to display expired events

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1091812
    Impact Hub
    Participant

    Hi – how can I show a simple wordpress loop which has the last 10 expired events?

    #1091826
    George
    Participant

    Hey Bobby,

    You should be able to do this by using the tribe_get_events() function on your site. While we cannot help with custom code-writing (see this article for more about that), we have a handy article about using that function here:

    • https://theeventscalendar.com/knowledgebase/using-tribe_get_events/

    So, for example, something as simple as this should do the trick:


    $events = tribe_get_events( array(
    'posts_per_page' => 10,
    'eventDisplay' => 'past'
    ) );

    I hope this helps! Explore that knowledgebase article, tinker around a bit, and see what you can come up with—and let me know if I can try to help anything else.

    Sincerely,
    George

    #1095861
    Impact Hub
    Participant

    Yes, I’ve seen this function and documentation but it does not work for my setup which is using visual content builders. Do you not have an equivalent WordPress “normal” loop code? Something more wordpress compatible/standards?

    #1095920
    George
    Participant

    Hey Bobby,

    I’m sorry to bear this news, but we do not have anything like you describe. 🙁 Our code is itself just a wrapper for WP_Query, so it actually IS “normal” loop code.

    Your visual content builders are the non-normative, non-standard things. For assistance with using these builders to build events queries, I would recommend reaching out to support teams of these content-builder themes/plugins.

    Best of luck with your customizing!
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom loop to display expired events’ is closed to new replies.