{"id":2300,"date":"2026-10-20T08:30:40","date_gmt":"2026-10-20T07:30:40","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/remove-link-from-listing-title\/"},"modified":"2026-10-20T08:39:39","modified_gmt":"2026-10-20T07:39:39","slug":"remove-link-from-listing-title","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/code-snippets\/remove-link-from-listing-title\/","title":{"rendered":"How to remove the link from the listing title"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">GD &gt; Post Title always links to the listing&#8217;s details page and has no option to turn the link off. You can remove the link with a short PHP snippet, or make it unclickable with CSS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Remove the link with PHP<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Add this with the <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/useful-plugins\/code-snippets-plugin\/\">Code Snippets plugin<\/a>. It strips the link from every title output by GD &gt; Post Title, including the titles in GD &gt; Simple Archive Item cards, and leaves the plain text.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-php\">add_filter( &#039;geodir_widget_post_title_output&#039;, &#039;my_gd_unlink_post_title&#039;, 10, 2 );\nfunction my_gd_unlink_post_title( $output, $title_tag ) {\n\treturn preg_replace( &#039;\/&lt;a\\b&#091;^&gt;&#093;*&gt;(.*?)&lt;\\\/a&gt;\/s&#039;, &#039;$1&#039;, $output );\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Make it unclickable with CSS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you only need the title not to respond to clicks, add this in Appearance &gt; Customize &gt; Additional CSS. The link is still in the page source, so search engines still see it.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-css\">.geodir-entry-title a {\n\tpointer-events: none;\n\tcolor: inherit;\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Remove the link from the image too<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In your Archive item template (GeoDirectory &gt; Settings &gt; General &gt; Pages), set the Link to: option of GD &gt; Post Images to None, which is <code>link_to=&#039;&#039;<\/code> in the shortcode. If you use GD &gt; Simple Archive Item, set its Image link option to No link.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Removing the links does not remove the details pages. They can still be reached from their URL and from search engines.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GD &gt; Post Title always links to the listing&#8217;s details page and has no option to turn the link off. You can remove the link with a short PHP snippet, or make it unclickable with CSS. Remove the link with PHP Add this with the Code Snippets plugin. It strips the link from every title [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[],"article\/categories":[211,433],"class_list":["post-2300","gd_place","type-gd_place","status-publish","hentry","gd_placecategory-tips-tricks-more","gd_placecategory-code-snippets"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2300","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=2300"}],"version-history":[{"count":2,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2300\/revisions"}],"predecessor-version":[{"id":2609,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2300\/revisions\/2609"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2300"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2300"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}