Hiding events from custom query using the 'Hide from Event Listings' option

Home Forums Calendar Products Events Calendar PRO Hiding events from custom query using the 'Hide from Event Listings' option

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1269372
    serenaz
    Participant

    I am using a custom query to display the next upcoming event on the homepage. However, if I choose the ‘Hide from Event Listings’ option when I create an event, it still displays on the homepage. How can I alter this query to ignore events that are marked ‘Hide from Event Listings’?


    $events = tribe_get_events( array(
    'posts_per_page' => 1,
    'start_date' => date( 'Y-m-d H:i:s' )
    ) );

    #1270335
    Shelby
    Participant

    Hey Luke,

    Thanks for posting, I’m happy to help.:)

    This kind of request would require some custom dev work, which unfortunately is outside the scope of the support on our forums. We have some resources for doing that here and here. If you need to find someone to help with the customizations, we also have some tips for finding help here.

    Hope this helps!

    Thanks,

    Shelby

    #1273240
    serenaz
    Participant

    Hi Shelby,

    I totally get that. I was just a bit surprised that I couldn’t find the query argument in the documentation. Luckily, with a little help from Google I was able to run it down.

    Thank you!

    For anyone else who might be looking for this, here’s what I found. https://theeventscalendar.com/support/forums/topic/using-tribe_get_events-and-ignoring-those-marked-hide-from-event-listings/

    I was able to use the query argument 'hide_upcoming' => true with tribe_get_events to filter out hidden events.

    • This reply was modified 9 years ago by serenaz.
    • This reply was modified 9 years ago by serenaz.
    #1283961
    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 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Hiding events from custom query using the 'Hide from Event Listings' option’ is closed to new replies.