Created
May 18, 2022 12:31
-
-
Save propertyhive/4506a9d7b800014f7c430c375542ab35 to your computer and use it in GitHub Desktop.
Custom shortcodes to output lat/lng
This file contains hidden or 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
add_shortcode( 'property_lat', 'property_lat_shortcode' ); | |
function property_lat_shortcode() | |
{ | |
global $property; | |
ob_start(); | |
echo $property->latitude; | |
return ob_get_clean(); | |
} | |
add_shortcode( 'property_lng', 'property_lng_shortcode' ); | |
function property_lng_shortcode() | |
{ | |
global $property; | |
ob_start(); | |
echo $property->longitude; | |
return ob_get_clean(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment