Showing posts with label found the location. Show all posts
Showing posts with label found the location. Show all posts

Thursday, May 31, 2012

Directorypress Details page display / adding map location

One of the biggest issues I had with the Directorypress template is editing the details page.

I wanted the map location (map_location) to display on the details page.
I searched for sometime for an answer on the best way to get this done and finally came across this http://www.premiumpress.com/forums/topic/address-for-map-location-on-add-listing-form In the directory press forums.

The page that you need to edit is called _single.php
(_single.php)  found under Admin > appearance > 

Then you can add the following code to display any field or custom field: 
<?php echo get_post_meta($post->ID, "map_location", true); ?> 

you can replace "map_location" with any other field you would like to display, I actually added this code above the listing and also next to the Google map to display the address. To see how this looks on my directory press details page visit: http://georgiahealthcareprofessionals.com

I also went a little further and used the code from a Google gadget that get's directions and also added that to my _single.php page. 


 
 

Translate