query by country – City – Other fields

Home Forums Calendar Products Community Events query by country – City – Other fields

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #262749
    xumus
    Participant

    Hi, I would like you could help me to know how to query using the fields of the event like country, city, etc. and tell me another options that could be use to query using tribe events plugin. Thanks

    #264675
    Casey
    Participant

    xumus,
    Thanks for getting in touch! You can use the tribe_get_events() function to query Events just like would with get_posts(). Here are some code examples using tribe_get_events() to query Events.

    You can also perform Meta Queries using tribe_get_events(), and you can view the Meta Keys to query off of by installing a plugin like post meta inspector, which will allow you to see the Post Meta keys for each event (screnshot).

    Hopefully that points you in the right direction. Thanks! ๐Ÿ™‚

    -Casey-

    #466425
    Casey
    Participant

    I just wanted to follow up and see if youโ€™re all set here or if you still have further questions. Just let me know if you have further questions or if I should go ahead and close out this thread. Thanks! ๐Ÿ™‚

    -Casey-

    #554428
    xumus
    Participant

    The query codes you refer are not really usefull for me, because there is not an example for use venue country, venue city, etc. into the query and when I use it like get_post doesn’t work too. I would like you could tell another way to query by country and not by venueID please. Thanks

    #557303
    Casey
    Participant

    xumus,
    First, you’ll have to query the Venues custom post type using the Country post meta field as your search parameter, in order to retrieve the Venue IDs to use in your tribe_get_events() Meta Query.

    Hopefully that points you in the right direction. Good luck!

    Thanks! ๐Ÿ™‚

    -Casey-

    #563836
    xumus
    Participant

    This reply is private.

    #589647
    Casey
    Participant

    xumus,
    I’ve put together a little code snippet that should show you how to do something like this. Take a look here: https://gist.github.com/ckpicker/b247169a4f124fa6ea7c My example shows you how to query Venues based on City / Country, and then use those Venue IDs to query associated Events.

    Hopefully that points you in the right direction, but let me know if you have further questions. Thanks! ๐Ÿ™‚

    -Casey-

    #706406
    Casey
    Participant

    I just wanted to follow up and see if youโ€™re all set here or if you still have further questions. Just let me know if you have further questions or if I should go ahead and close out this thread. Thanks! ๐Ÿ™‚

    -Casey-

    #730442
    Casey
    Participant

    Since I havenโ€™t heard back from you here, Iโ€™m going to go ahead and close out this thread. Feel free to start a new thread if you have further issues. Thanks! ๐Ÿ™‚

    -Casey-

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘query by country – City – Other fields’ is closed to new replies.