Intercepting the Loop and reorganizing for Featured Listings

Home Forums Ticket Products Event Tickets Plus Intercepting the Loop and reorganizing for Featured Listings

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1531067
    Sarah Auerswald
    Participant

    I’m trying to get the featured listings to show up at the top of the day on the loop. I believe I can just intercept the loop (/list/loop.php) using WordPress’s standard pre_get_posts function. However, I’m not sure where the “featured listing” checkbox setup in the backend is stored in the database. Could I use that to reorganize the loop and pull out first by day and then by featured listing and then by time?

    #1531445
    Andras
    Keymaster

    Hi sarah,

    Thanks for reaching out!

    When an event is marked featured, then it gets an entry in the wp_postmeta table with the meta key “_tribe_featured” and the value “1”.

    Something like this: https://cloudup.com/cM4e6zGTbmO

    Here is a sample for a custom query for events, which should get you started. You will need to tweak this to suit your needs:

    https://gist.github.com/andrasguseo/461285a20511647c092247ef12ea3092

    And you can find further info on custom queries here: https://codex.wordpress.org/Custom_Queries

    And many more places on the web. 🙂

    Let me know if you need further assistance.

    Cheers,
    Andras

    #1548541
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Intercepting the Loop and reorganizing for Featured Listings’ is closed to new replies.