Support

Home Forums Event Espresso Premium EE4 – List events by Venue

EE4 – List events by Venue

Posted: June 7, 2017 at 2:52 am

Viewing 15 reply threads


greyowl

June 7, 2017 at 2:52 am

I’m trying to use the snippet given by Tony in a previous Q on this subject. Where do I put it? I’ve created a function in my child theme with that content. Is that right? But then how do I make use of it?


Tony

  • Support Staff

June 7, 2017 at 4:47 am

Hi there,

Which snippet are you referring to? I have a lot of snippets so just want to be sure I’m looking at the same one.

Can you post the link here so I can take a look?


greyowl

June 7, 2017 at 5:01 am

https://eventespresso.com/topic/ee4-list-events-by-venue/


Tony

  • Support Staff

June 7, 2017 at 5:08 am

The snippet linked in that post uses a hook within EE4 so if you have added it to your themes functions.php file it should already be in use.

What it does is add a list of events to the venue page, so if you view the venue you page you should see a section that now lists any events assigned to that venue.


greyowl

June 7, 2017 at 6:00 am

I’ve added the function to functions.php in my child theme but see no effect. The problem ist that my venues page isn’t working properly, as you know (See https://eventespresso.com/topic/google-maps-not-showing-on-venues-page/)


Josh

  • Support Staff

June 7, 2017 at 7:48 am

You’ll need to get that /venues/ url issue sorted out. There’s a snippet you can add to your functions file that will make it so you can specify the /venues/ part of the url. Here’s a link to the documentation that includes the snippet:

https://eventespresso.com/wiki/ee4-custom-post-types/#venue_slug

After you put the code in place, you will need to visit your site’s WP > Settings > Permalinks page for the change to take effect.


greyowl

June 7, 2017 at 9:38 am

Done that. When the WP language is set to German or French, the /locations/ page still shows the venue photos but neither addresses nor maps nor course list per location. If I set the WP language is to US-English, all is revealed.


Josh

  • Support Staff

June 7, 2017 at 9:53 am

Did you reset the permalinks after switching to another language? To be clear, are you switching the site language in WP > Settings > General or by some other means?


greyowl

June 7, 2017 at 9:55 am

Yes, I reset the permalinks after switching to another language and yes, I switch the site language in WP > Settings > General


Josh

  • Support Staff

June 7, 2017 at 1:40 pm

Can you try this code instead of the code from the documentation?

https://gist.github.com/joshfeck/e1cd37a8ff1d37286c8ee36a73a82902

After you apply the code, you’ll need to visit WP > Settings > Permalinks.


greyowl

June 7, 2017 at 2:30 pm

That works! Thanks a lot.


greyowl

June 8, 2017 at 7:58 am

I still have issues:
– I want to remove the headings DETAILS, LOCATION and the “Read more” link
– The prompt “UPCOMING EVENTS AT THIS VENUE” isn’t in the .po file. Where can I translate it?
– When I choose an event from the “All venues” page (but not when I select it directly!), comments are allowed. How can I suppress the “LEAVE A COMMENT” option?


Josh

  • Support Staff

June 8, 2017 at 8:26 am

– I want to remove the headings DETAILS, LOCATION and the “Read more” link

You could hide those using CSS, or, the Read More link might be something your theme adds, you can check the archive.php template and wrap it in a condition or remove the code that adds it.

The Details heading is in the content-espresso_venues-details.php template, and the location heading is in the content-espresso_venues-location.php template. You can copy those templates to your WordPress theme and make edits to the copies. Event Espresso will check first for your theme’s templates.

– The prompt “UPCOMING EVENTS AT THIS VENUE” isn’t in the .po file. Where can I translate it?

You can translate the string (or make it translation ready) in the custom code:
https://gist.github.com/joshfeck/0622e324fb3729880f67#file-events_venue-php-L23

– When I choose an event from the “All venues” page (but not when I select it directly!), comments are allowed. How can I suppress the “LEAVE A COMMENT” option?

You go to edit the event and uncheck the box next to “Allow comments”.


greyowl

June 8, 2017 at 11:21 am

I’ve managed to suppress the DETAILS and LOCATION headings and the Read More link. And I’ve found the (hidden) “Allow comments” box and unchecked it.

But I have no events_venue.php file. Where exactly should I add your snippet?


Josh

  • Support Staff

June 8, 2017 at 11:55 am

You said earlier that you added the code to your functions.php file. Did you remove it?


greyowl

June 8, 2017 at 12:00 pm

Sorry, I overlooked that. I’ve fixed the “UPCOMING EVENTS AT THIS VENUE” message.

Viewing 15 reply threads

The support post ‘EE4 – List 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