Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created February 14, 2020 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/c7ca07d8f9c1f990942df2b742538112 to your computer and use it in GitHub Desktop.
Save joshfeck/c7ca07d8f9c1f990942df2b742538112 to your computer and use it in GitHub Desktop.
Display venue City, State/Province, Country on the event list page, after the dates
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_action(
'AHEE_event_details_after_event_date',
'my_custom_venue_details_for_event_list'
);
function my_custom_venue_details_for_event_list($post) {
if(is_archive()) {
add_filter(
'FHEE__EE_Inline_Address_Formatter__address_formats',
function(){
$address_formats[ 'CA' ] = "{city}, {state}<br>{country}";
$address_formats[ 'US' ] = "{city}, {state}<br>{country}";
return $address_formats;
}
);
echo '<div>';
espresso_venue_address( 'inline' );
echo '</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment