Every GeoDirectory widget has its own show and hide options, so one sidebar can serve your whole site and each GD widget appears only on the directory pages you pick. For widgets from WordPress or other plugins, use a widget logic plugin with GeoDirectory’s conditional functions.
GeoDirectory widgets
Open a GD widget in Appearance > Widgets and find Show / Hide Options. You can choose:
- Show everywhere
- Show only on GD pages
- Show on selected pages
- Hide on selected pages
For the last two, pick the pages under GD Pages: Add Listing Page, Author Page, Listing Detail Page, Location Page, Post Type Archive, Search Page and Taxonomies Page. More detail is in Widget show / hide options.
Other widgets
Widgets that do not come from GeoDirectory have no such options. A plugin like Widget Logic lets you give any widget a PHP condition, and GeoDirectory’s functions work there:
geodir_is_page( 'single' ) // any listing detail page
is_singular( 'gd_event' ) // detail pages of the Events post type only
geodir_is_page( 'search' ) // the search results page
geodir_is_page( 'archive' ) // category, tag and post type archive pages
geodir_is_page( 'location' ) // the location page
A condition such as is_page( 'gd-details' ) will not work on listing pages. The Details page is only the template, and the visitor is viewing the listing itself, so test for the listing’s post type as in the examples. How to use GeoDirectory conditional tags has more examples.
A different layout for one post type
If one post type needs a different sidebar or layout altogether, give it its own template pages in that post type’s settings, for example Events > Settings > General. See Creating different templates for Custom Post Types.