{"id":2880,"date":"2026-10-20T08:37:16","date_gmt":"2026-10-20T07:37:16","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/show-sidebar-widgets-only-on-geodirectory-pages\/"},"modified":"2026-10-20T08:37:16","modified_gmt":"2026-10-20T07:37:16","slug":"show-sidebar-widgets-only-on-geodirectory-pages","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-tos\/show-sidebar-widgets-only-on-geodirectory-pages\/","title":{"rendered":"How to show sidebar widgets only on GeoDirectory pages"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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&#8217;s conditional functions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GeoDirectory widgets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open a GD widget in Appearance &gt; Widgets and find Show \/ Hide Options. You can choose:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Show everywhere<\/li>\n\n\n\n<li>Show only on GD pages<\/li>\n\n\n\n<li>Show on selected pages<\/li>\n\n\n\n<li>Hide on selected pages<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">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 <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/widget-show-hide-options\/\">Widget show \/ hide options<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Other widgets<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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&#8217;s functions work there:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\">geodir_is_page( &#039;single&#039; )      \/\/ any listing detail page\nis_singular( &#039;gd_event&#039; )        \/\/ detail pages of the Events post type only\ngeodir_is_page( &#039;search&#039; )      \/\/ the search results page\ngeodir_is_page( &#039;archive&#039; )     \/\/ category, tag and post type archive pages\ngeodir_is_page( &#039;location&#039; )    \/\/ the location page<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A condition such as <code>is_page( &#039;gd-details&#039; )<\/code> 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&#8217;s post type as in the examples. <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/code-snippets\/how-to-use-geodirectory-conditional-tags\/\">How to use GeoDirectory conditional tags<\/a> has more examples.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A different layout for one post type<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If one post type needs a different sidebar or layout altogether, give it its own template pages in that post type&#8217;s settings, for example Events &gt; Settings &gt; General. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/custom-post-types-extension\/creating-different-templates-for-custom-post-types\/\">Creating different templates for Custom Post Types<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s conditional functions. GeoDirectory widgets Open a GD widget in Appearance &gt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,432],"class_list":["post-2880","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-how-tos"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=2880"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2880\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2880"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2880"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}