Home Forums Event Espresso Premium Need Help with Address and Location of Code Snippet on Venue Listing

Need Help with Address and Location of Code Snippet on Venue Listing

Posted: February 28, 2019 at 8:56 pm


February 28, 2019 at 8:56 pm

I almost have my edited venue template displaying like I want but I’m having trouble with two issues.

1. I’m trying to get the “Address:” label and address information to display on one line.

2. I would like the “upcoming events for a venue” code snippet to display after the venue description but before the Google Map, but I’ve moved the address display above the description. The code snippet in my child theme is set to display “after_the_content”.

Here is the link to my dev site:

Here is my edited content-espresso_venues-details.php:

Any help would be much appreciated.

<?php //echo '<h1>' . __FILE__ . '</h1>'; ?>
<?php global $post; ?>
<div class="venue-content">
<?php if ( apply_filters( 'FHEE__content_espresso_venues_details_template__display_entry_meta', TRUE )): ?>
<div class="entry-meta">
<span class="tags-links"><?php espresso_venue_categories( $post->ID, TRUE, TRUE ); ?></span>
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'event_espresso' ), __( '1 Comment', 'event_espresso' ), __( '% Comments', 'event_espresso' ) ); ?></span>

edit_post_link( __( 'Edit', 'event_espresso' ), '<span class="edit-link">', '</span>' );
<?php endif; ?>

<?php the_title(); ?>

do_action( 'AHEE__content_espresso_venues_details_template__before_the_content', $post );

<?php if ( $venue_phone = espresso_venue_phone( $post->ID, FALSE )) : ?>
<?php _e( 'Phone:', 'event_espresso' ); ?> <?php echo $venue_phone; ?><br>
<?php endif; ?>
<?php if ( $venue_website = espresso_venue_website( $post->ID, FALSE )) : ?>
<?php _e( 'Website:', 'event_espresso' ); ?> <?php echo $venue_website; ?><br>
<?php endif; ?>
<?php if ( espresso_venue_has_address( $post->ID )) : ?>
<?php _e( 'Address:', 'event_espresso' ); ?><?php espresso_venue_address( 'inline', $post->ID ); ?>
<?php endif; ?>

if ( is_archive() && has_excerpt( $post->ID )) {
} else {

do_action( 'AHEE__content_espresso_venues_details_template__after_the_content', $post )

<!-- .venue-content -->


March 1, 2019 at 10:26 am

I was able to achieve the results I wanted but for #1, I was forced to edit EEH_Address.helper.php. However, the changes did not apply when it was copied into my Child Theme. So I had to overwrite the original in the plugins core/helpers folder. Not ideal, as I’ll have to edit it again with any plugin updates.

I hope the Event Espresso Team will consider moving the address format template to public as dealing with address formatting in Event Espresso 4 is a real pain.

For #2, I was able to move the “after_the_content” action to content-espresso_venues-location.php before the Google Map.


  • Support Staff

March 1, 2019 at 1:19 pm

You do not need to make edits to core code to make the formatting changes.

You could either use CSS:

.venue-location div[itemprop="address"]{
margin-left: 10px;

Or if you do not want to use CSS to change the format, you could override the espresso_venue_address function with your own version (it’s a pluggable function, or since you’re already altering the template, just call your own function). Your custom function could be based on the venue address helper method.

The support post ‘Need Help with Address and Location of Code Snippet on Venue Listing’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 2 months, 2 weeks ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!