Created
February 14, 2020 22:45
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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