GeoDirectory builds the listing details page from an ordinary WordPress page, the Details template page. You change the layout by editing that page with blocks, shortcodes or your page builder. Theme files such as single-{post-type}.php are not used for this.
Edit the details template
- Go to GeoDirectory > Settings > General > Pages. Under Template Page Settings, Details Page shows which page is used.
- Edit that page. Its default content is a set of GeoDirectory blocks: GD > Notifications, GD > Post Images, GD > Single Taxonomies, GD > Single Tabs and GD > Single Next Prev.
- Add, move or remove blocks, then update the page. The same layout is used for every listing, and each block fills in the data of the listing being viewed.
To show one field on its own, add a GD > Post Meta block and choose the field, for example [gd_post_meta key="address"]. Fields you create at Places > Settings > Custom Fields can be shown this way, so you usually do not need Advanced Custom Fields for listing data.
The tabs come from the GD > Single Tabs block, and you manage them at Places > Settings > Tabs. See How to Use the Tabs Builder in GeoDirectory. To show everything on one page without tabs, see How can I show all Detail content on the page instead of tabs?.
The sidebar and page width come from the page template your theme applies to the Details page, so pick a template with a sidebar there if you want one.
A different details page for each post type
Each post type can have its own template page. Create a page with the layout you want, go to that post type’s settings (for example Places > Settings > General), and select it as Details Page under Template Page Settings. Post types without their own page use the default from the main settings. Creating different templates for Custom Post Types walks through it. You need the Custom Post Types add-on to have separate post types such as Hotels and Businesses.
Different content for different categories
There is no separate template per category. Inside one template you can show content only for listings in a given category with GD > Dynamic Content. Set Field Key to default_category, the condition to “is equal” and the value to the category ID:
[gd_dynamic_content key="default_category" condition="is_equal" search="12" html="Free parking for hotel guests."]
The text only shows on listings whose default category has ID 12.
Editing the PHP templates
For changes the blocks cannot make, the PHP templates are in wp-content/plugins/geodirectory/templates/. Copy the file you need into a geodirectory folder in your child theme, keeping the same path, and edit the copy. For example templates/bootstrap/single/ files go in your-child-theme/geodirectory/bootstrap/single/. Customizing templates has more on this.