{"id":2386,"date":"2026-10-20T08:32:20","date_gmt":"2026-10-20T07:32:20","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/show-featured-listings-shortcode\/"},"modified":"2026-10-20T08:41:00","modified_gmt":"2026-10-20T07:41:00","slug":"show-featured-listings-shortcode","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/show-featured-listings-shortcode\/","title":{"rendered":"How to show featured listings with a shortcode"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Use the GD &gt; Listings shortcode with <code>show_featured_only=&quot;1&quot;<\/code>. It works on any page or post, including a home page that is not a GeoDirectory page:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-markup\">&#091;gd_listings post_type=&quot;gd_place&quot; show_featured_only=&quot;1&quot; post_limit=&quot;6&quot; layout=&quot;3&quot;&#093;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">What each option does:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>post_type<\/code> is the post type to show. <code>gd_place<\/code> is the default Places type.<\/li>\n\n\n\n<li><code>show_featured_only=&quot;1&quot;<\/code> limits the list to listings marked as featured.<\/li>\n\n\n\n<li><code>post_limit<\/code> is how many listings to show.<\/li>\n\n\n\n<li><code>layout<\/code> is <code>0<\/code> for a list, or <code>1<\/code> to <code>5<\/code> for a grid with that many columns.<\/li>\n\n\n\n<li><code>category<\/code> takes a category ID if you only want featured listings from one category.<\/li>\n\n\n\n<li><code>add_location_filter<\/code> is on by default. Set it to <code>0<\/code> if the list should ignore the location the visitor is browsing.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Using it in a page builder<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the block editor, add the GD &gt; Listings block and tick &#8220;Show featured only?&#8221;. In Elementor, Divi, Avada and similar builders, paste the shortcode into the builder&#8217;s shortcode or text element. You do not need a plugin that turns widgets into shortcodes, because every GeoDirectory widget is also a shortcode and a block.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/shortcode-builder\/\">Shortcode Builder<\/a> lets you pick the options in a form and copies the shortcode for you. The full list of options is in <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/core-widgets\/gd-listings\/\">GD &gt; Listings<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How a listing becomes featured<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Featured is a custom field. If your post type does not have it yet, add the Featured field at Places &gt; Settings &gt; Custom Fields. It is an admin only field, so you tick &#8220;Is Featured?&#8221; when editing the listing in wp-admin and users cannot set it themselves.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use the GD &gt; Listings shortcode with show_featured_only=&quot;1&quot;. It works on any page or post, including a home page that is not a GeoDirectory page: What each option does: Using it in a page builder In the block editor, add the GD &gt; Listings block and tick &#8220;Show featured only?&#8221;. In Elementor, Divi, Avada and [&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-2386","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\/2386","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=2386"}],"version-history":[{"count":2,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2386\/revisions"}],"predecessor-version":[{"id":2693,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/2386\/revisions\/2693"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=2386"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=2386"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=2386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}