propertyhive / WP-Property-Hive

The complete estate agency software plugin for WordPress
Other
25 stars 25 forks source link

Location data #194

Closed SpinDreams closed 2 years ago

SpinDreams commented 2 years ago

Maybe I am missing something, but I can't seem to output the property location data, I am using Elementor to create the pages, would be great to have an elementor widget the outputs the properties' location data, and especially the Location field, maybe with the option to just show the first entry, last entry or all entries. Maybe this is a feature request! :)

SpinDreams commented 2 years ago

Okay I worked something Out, I added a shortcode to my client functions template and loaded the values there, not as elegant as a widget but it does the job.

// Shortcode to output custom PHP in Elementor function wpc_elementor_shortcode( $atts ) { global $property; echo "Location: " . $property->location; } add_shortcode( 'ph_location', 'wpc_elementor_shortcode');

propertyhive commented 2 years ago

Thanks for posting your workaround. To be honest we find the location field is mainly used for filtering, as opposed to being output on the property details which is why I suspect this hasn't come before. Worth noting though and I'll consider it for future.

Thanks again, Steve