GeoDirectory can show the address and phone number anywhere on the listing page with two blocks: GD > Post Address and GD > Post Meta. You do not need to edit any theme template files.
Add them to the details page
- Go to GeoDirectory > Settings > General > Pages and open the page set as Details Page.
- Add a GD > Post Address block. Use the Address template option if you want to change which parts show or where the line breaks go, and tick the map link option if you want it to open Google Maps.
- Add a GD > Post Meta block and set its key to your phone field (it is called
phoneon a standard install). - Update the page.
As shortcodes:
[gd_post_address show='icon-label-value']
[gd_post_meta key='phone' show='icon-label-value']
Phone fields are output as a tel: link, so tapping the number on a phone opens the dialler.
Show them in the sidebar instead
Each custom field has a Show in extra output location setting at Places > Settings > Custom Fields. Tick Details page sidebar for the address and phone fields, then add the GD > Output Location widget (location set to detail) to the sidebar your theme uses on listing pages.
They still do not show
- Check the listing actually has a phone number saved.
- Check the field is active in the custom field settings.
- Look for custom CSS in your theme or child theme that hides GeoDirectory address or contact classes.
See GD > Post Address and GD > Post Meta for every option.