Event Search pre-defined filter

This topic contains 4 replies, has 2 voices, and was last updated by  Adnan Akbas 7 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24261

    Hi,

    what I would like to achieve is to pre-define category in event searches:

    Something like this:

    [event_search event_category=”music” filters=”country”]

    So, in this case, when searched, only events in category music for the selected country should be listed.
    I don’t want to show category filter to the visitors.

    Any ideas?

    Adnan Akbas
    #24301

    Hi Adnan,

    That should pre-set the event category to music, to remove the filters you can use the filters attribute to list the ones you do want: http://docs.wp-event-organiser.com/shortcodes/event-search/

    Stephen Harris
    #24302

    Hi Stephen,

    This example shortcode is not working.
    I think “event_category” attribute does not exist for event_search shortcode.

    Adnan Akbas
    #24377

    Hi Adnan,

    Apologies for the delay in getting back to you, but try:

    [event_search filters="event_category,state" event-category="music"]
    

    Strictly speaking shorcode attributes shouldn’t contain a hyphen (which is why the eo_events shortcode uses event_category instead), but this does work. The only thing I have noted is that the select does not reflect the currency choice.

    Stephen Harris
    #24380

    Hi Stephen,

    this works for me.

    Thank you.

    Adnan Akbas
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.