{"id":2683,"date":"2026-10-20T08:35:27","date_gmt":"2026-10-20T07:35:27","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/filter-gd-listings-by-category-and-tag\/"},"modified":"2026-10-20T08:40:41","modified_gmt":"2026-10-20T07:40:41","slug":"filter-gd-listings-by-category-and-tag","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/filter-gd-listings-by-category-and-tag\/","title":{"rendered":"How to filter GD Listings by category and tag"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You can use both filters at once. The GD &gt; Listings block and the <code>&#091;gd_listings&#093;<\/code> shortcode accept categories and tags together. A listing then has to match both: it must be in one of the categories you chose and have at least one of the tags.<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_listings post_type=&quot;gd_place&quot; category=&quot;12,15&quot; tags=&quot;pizza,garden&quot; post_limit=&quot;10&quot;&#093;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>category<\/code> takes category IDs, separated by commas. In the block you can pick the categories from a list instead.<\/li>\n\n\n\n<li><code>tags<\/code> takes tag names, separated by commas. It is under the advanced settings of the block.<\/li>\n\n\n\n<li>Leave either one empty to filter by the other only.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">To find a category ID, go to Places &gt; Categories and hover over the category name. The ID is the <code>tag_ID<\/code> number in the link.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On a listing&#8217;s details page, &#8220;Filter listings related to&#8221; can show listings that share the current listing&#8217;s categories or tags, without typing IDs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The GD &gt; Map block has matching options (Category restrictions and Filter by tags) if you want a map of the same listings. All the GD &gt; Listings options are described in <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-listings\/\">GD &gt; Listings<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can use both filters at once. The GD &gt; Listings block and the &#091;gd_listings&#093; shortcode accept categories and tags together. A listing then has to match both: it must be in one of the categories you chose and have at least one of the tags. To find a category ID, go to Places &gt; [&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-2683","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\/2683","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=2683"}],"version-history":[{"count":1,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2683\/revisions"}],"predecessor-version":[{"id":2825,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2683\/revisions\/2825"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2683"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2683"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}