• Resolved eastbank

    (@eastbank)


    I’m wondering if it’s possible to add a hidden field to the event search form that would tell the form to exclude specific categories from the search results?

    I know this is easily done when displaying events with a shortcode, so it should be possible right? If it is, what would that look like?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    At the moment those would require some custom coding on your end. This link might help you. https://wp-events-plugin.com/tutorials/creating-custom-event-search-attributes/

    Thread Starter eastbank

    (@eastbank)

    Thanks, I’m not sure it needs to be that complex.

    I understand that I’ll need to do some custom coding in the form, but I’m using the default ‘event-categories’ taxonomy.

    Maybe if I explain a bit more a simple solution can be revealed.

    I have categories A, B, and C. When a user searches for events using the form generated by the [event_search_form] shortcode, I only want results from category A to ever be presented.

    I would imagine this should be fairly simple, since there is the option to add negative category IDs into the [events_list] shortcode.

    I have purchased the pro version, would posting this in the pro support forum be a better place to ask?

    Thanks!

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you can try to hook into em_content_events_args filter or modify template file at events-manager/templates/templates/events-list.php

    eg.

    
    $args['category'] = "-X";
    

    negative sign means exclude while X is the events category id

    to use templates: https://wp-events-plugin.com/documentation/using-template-files/

    eg. wp-content/themes/Your Theme/plugins/events-manager/templates/events-list.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using search form, exclude specific categories from results?’ is closed to new replies.