Support

Home Forums Event Espresso Premium View Events by Venue

View Events by Venue

Posted: January 11, 2016 at 7:22 pm


laurian Horowitz

January 11, 2016 at 7:22 pm

Is there a way to filter the events by venue? I would like to allow people to find events by the venue closest to them. I am using EE4 and don’t seem to find an easy way to do this. I found documentation on code snippets that included to Print a list of upcoming events for a venue on the venue details page. (https://eventespresso.com/wiki/useful-php-code-snippets/) but wasn’t successful in getting this code to connect properly. Could you help guide me in the right direction? I may have not connected it right, so any help or guidance would be greatly appreciated. Thank you!


Josh

  • Support Staff

January 12, 2016 at 8:04 am

Hi there,

When you added the code to your website, did you add it to either a functions plugin or into your WordPress theme’s functions.php file?


laurian Horowitz

January 12, 2016 at 2:43 pm

I had tried both ways, but I think I was missing the hookup. Once the code is included in the functions.php, how do I connect it to the venue details page?

For the venue details page, I’m using the permalink of the venue and linking to that page. I’m expecting to find the events for that venue on that page. It could also be I’ve misunderstood something. Thank you for your help.


Josh

  • Support Staff

January 12, 2016 at 2:55 pm

The last line of code in the gist, which is this:

add_action( 'AHEE__content_espresso_venues_details_template__after_the_content', 'ee_list_upcoming_events_for_a_venue' );

Serves the purpose of hooking the function to the action hook. If it’s not working, there may be another plugin that’s not allow the custom venue content to display. There’s a few plugins out there that will run filters on the_excerpt() which strangely will affect this. As a quick test to check, can you go into a venue and edit it, and add an excerpt, then check the venue page to see if that makes a difference?


laurian Horowitz

January 12, 2016 at 7:15 pm

Josh, That was exactly it. I found where the excerpts were being blocked and now the events are listed before the venue details. It was the theme – the theme had been set to not show excerpts, but without knowing that was the problem, I would never have guessed to look at that.

Your help has been certainly appreciated!

The support post ‘View Events by Venue’ 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