The GeoDirectory search results page is a normal WordPress page, so you change it by editing that page. There is no template file to edit.
Edit the search page
- Go to GeoDirectory > Settings > General > Pages and find the page set as Search Page.
- Edit that page. It holds the blocks or shortcodes that build the results, such as
[gd_search],[gd_loop_actions],[gd_loop]and[gd_loop_paging]. - Add your own content above or below them, or remove the parts you don’t need, then update the page.
Keep [gd_loop] on the page, as it outputs the results. Each listing in the results uses your Archive item template, set on the same settings screen, so edit that page to change how a single result looks.
Change the “no listings found” message
When nothing matches, GeoDirectory shows “No listings were found matching your selection.” You can change the wording with a translation, as shown in how to change just one language string.
To change the message only on the search page, or add your own HTML to it, use the geodir_no_listings_found_message filter:
add_filter( 'geodir_no_listings_found_message', function( $message, $post_type ) {
if ( geodir_is_page( 'search' ) ) {
$message = 'Nothing matched your search. Try fewer words or a wider area.';
}
return $message;
}, 10, 2 );
Sidebar shows below the results
The position of the sidebar comes from your theme’s page layout, not from GeoDirectory. Check the layout or page template options your theme offers for the search page. If your theme uses a page builder, see using a builder with GeoDirectory.
For an overview of the GeoDirectory page templates, see design or customize GeoDirectory pages.