{"id":2668,"date":"2026-10-20T08:35:26","date_gmt":"2026-10-20T07:35:26","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/show-the-category-title-on-archive-pages\/"},"modified":"2026-10-20T08:40:41","modified_gmt":"2026-10-20T07:40:41","slug":"show-the-category-title-on-archive-pages","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/show-the-category-title-on-archive-pages\/","title":{"rendered":"How to show the category title on archive pages"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Add the GD &gt; Page Title block, widget or shortcode to your Archive page template. On a category page it prints the category title, for example &#8220;All Restaurants&#8221; followed by the location when one is set.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_page_title&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Your Archive page template is the page selected at GeoDirectory &gt; Settings &gt; General &gt; Pages &gt; Archive page. The same block works on tag pages and the search page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The v1 function <code>geodir_action_listings_title()<\/code> doesn&#8217;t exist in GeoDirectory v2, so code that used it needs replacing with the block or shortcode.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Changing the wording<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The title comes from GeoDirectory &gt; Settings &gt; General &gt; Titles &amp; Meta, under Archive pages &gt; Category Title. The default is:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">All %%category%% %%in_location_single%%<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>%%category%%<\/code> is the category name and <code>%%in_location_single%%<\/code> adds the location being viewed, such as &#8220;in Philadelphia&#8221;. Tag pages have their own Tag Title setting. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/explore-settings\/settings-overview-for-general-titles-meta\/\">Settings overview for General &gt; Titles &amp; Meta<\/a> for the other variables.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Styling the title<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Use the block settings, or shortcode options such as <code>tag<\/code> (h1, h2, h3 or div) and <code>text_alignment<\/code>. For example, to place the title over a header image in a builder layout:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_page_title tag=&quot;h1&quot; text_alignment=&quot;center&quot;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In Divi, Elementor and other builders, put the shortcode in a text or shortcode module of the archive template. See <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/getting-started\/using-a-builder-with-geodirectory\/\">Using a builder with GeoDirectory<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Add the GD &gt; Page Title block, widget or shortcode to your Archive page template. On a category page it prints the category title, for example &#8220;All Restaurants&#8221; followed by the location when one is set. Your Archive page template is the page selected at GeoDirectory &gt; Settings &gt; General &gt; Pages &gt; Archive page. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[213,422],"class_list":["post-2668","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-extensions-features","gd_placecategory-core-widgets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2668","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=2668"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2668\/revisions"}],"predecessor-version":[{"id":2811,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2668\/revisions\/2811"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2668"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2668"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}