Support

Home Forums Event Espresso Premium display only one recurring event in search results

display only one recurring event in search results

Posted: February 4, 2014 at 5:28 pm


Robin Jennings

February 4, 2014 at 5:28 pm

Hi

We were able (with your help, thanks) to display only one recurring event in the event list. However we still have all recurring events displaying in the search results. Is there a way please to display only one recurring event, as in the event list shortcode?


Sidney Harrell

February 7, 2014 at 12:53 pm

Can you give a link to the page with the search box? I’m not sure which search tool you mean. Thanks.


Robin Jennings

February 10, 2014 at 7:58 pm

I’m using the Event Espresso Search shortcode in the header here: http://www.match.vic.edu.au/

Thanks


Seth Shoultes

  • Support Staff

February 11, 2014 at 11:36 am

Hi Robin,

It looks like you may want to create a custom shortcode based on the [EVENT_SEARCH] shortcode to prevent the recurring events from showing up.

To do this, you will need to copy the contents of the ee_create_autocomplete_search() function (located in the wp-content/event-espresso/includes/shortcodes.php file) into a new function (something like “my_ee_create_autocomplete_search()”) in your theme-name-here/functions.php file. Then modify the query, to group the recurring events, using something like this at the very end of the query:
$SQL .= " GROUP BY e.recurrence_id ";

Screenshot for reference:
http://www.screencast.com/t/jdljvq61a

I hope that helps. Please let us know if you have any questions.

The support post ‘display only one recurring event in search results’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso