The single listing page in GeoDirectory is built from a normal WordPress page, the details template page. You change the layout by editing that page with blocks or shortcodes, and you rarely need to copy PHP template files into your theme.
Edit the details template page
- Go to GeoDirectory > Settings > General > Pages and look at Details Page under Template Page Settings. A post type can use its own page, set in Places > Settings > General.
- Open that page in your editor.
- Add, remove and rearrange GeoDirectory blocks such as GD > Post Images, GD > Single Tabs, GD > Post Meta, GD > Map and GD > Post Badge.
- Update the page and view a listing to check the result.
These are template blocks: they show the data of whichever listing is being viewed. See what is a template widget.
Choose which fields show
Fields are managed in Places > Settings > Custom Fields. Add new fields there, and use each field’s “Show in extra output location” setting to decide where it appears, for example on the detail page sidebar or in its own tab. The tabs on the listing page are arranged in Places > Settings > Tabs.
To place one field exactly where you want it, use GD > Post Meta:
[gd_post_meta key="your_field_key"]
Add a booking button
Add a URL field, for example with the key booking_url, then use GD > Post Badge to show it as a button only when the field has a value:
[gd_post_badge key="booking_url" condition="is_not_empty" badge="Book now" link="%%input%%" new_window="1"]
Sidebars
Your theme’s sidebar can hold any widgets. Template blocks such as GD > Post Meta also work in a sidebar on the detail page.
Overriding template files
For changes blocks cannot make, copy a file from the plugin’s templates folder into a geodirectory folder in your child theme and edit the copy. See customizing templates. Copied files need checking after GeoDirectory updates.