The Search Archive template is a WordPress page. The contents of the page are the GeoDirectory Elements that are used to display listings. The Search Archive page template shows search results in the form of lists of listings with the GD Loop Design Element. The Search Archive template starts with the slug of /search/.
Inside the template you will find default Elements that are installed with GD including GD Loop, GD Loop Actions, and GD Loop Paging. Each of these Elements is responsible for showing one specific feature.
Every time GD Search results are viewed on the frontend, the contents of the GD Search Archive template is queried, and each Element is rendered.
The ‘mini listings’ shown by GD Loop are based on the Archive Item template. You can find the Archive Item doc here.
The GD Search template is a WordPress page that is installed with GeoDirectory.
You can find the page by searching in the the Pages on your site in:
WordPress Backend – Pages – Search “gd” – Find the page titled Search, hover, and then edit the page.
Default Template Setting
Choose the default GD Search template in the Pages settings:
GeoDirectory – Settings – General – Pages – Detail template – Choose your template page
Adjust the slug for the search page by editing the page and looking for the permalinks option in the right hand sidebar. If you are using BuddyPress, be sure to change the slug to something else like /location-search/.
GeoDirectory Design Elements
The following GD Elements are commonly used in the Search Archive template.
GD Loop Actions – Sorting Options and Layouts selector.
GD Loop – Shows the main query for the Archive page, resulting in listings on the page.
GD Loop Paging – Paging options to page through the listings shown on the page.
GD Map – Use an Archive map type to show the listings on the page. It is recommended not to use “all_posts=1” to show all the posts.
GD Notifications – show notifications created by GD.
When GeoDirectory is installed, the template is installed with default content. If you make changes to the page, and want to restore the default content, you can find it in the GeoDirectory Settings:
GeoDirectory – Settings – General – Pages – Click “Default Content”
The default content will be shown in a lightbox modal. You can copy and paste the default content back into the Page, overwriting anything you already have in the page.
Sorting only applies to CPT Archive pages. Search results do not have sorting options. Read more about CPT Archive sorting options here.
You can absolutely use an advanced theme builder on the Search Archive. The layout must be setup as an “Archive” and assigned to the site search function. The layout will also takeover the default site search. See more information here on the builders doc.
Pages Templates and Sidebars
GD Uses the sidebars that come with your theme. Read more about how to choose a theme that has the sidebars you want here.
You can create the Search Archive listing template with PHP. See our page here to get started.