{"id":6123,"date":"2020-10-08T13:16:58","date_gmt":"2020-10-08T11:16:58","guid":{"rendered":"https:\/\/www.welaunch.io\/en\/?post_type=faq&#038;p=6123"},"modified":"2025-01-10T13:03:26","modified_gmt":"2025-01-10T12:03:26","slug":"wordpress-store-locator-listing-shortcode","status":"publish","type":"faq","link":"https:\/\/www.welaunch.io\/en\/knowledge-base\/faq\/wordpress-store-locator-listing-shortcode\/","title":{"rendered":"WordPress Store Locator Listing Shortcode"},"content":{"rendered":"<p>In version 1.13.0 we introduced a new Store locator listing shortcode. You can define a key, that you want to use for grouping (e.g. country). Then all stores within a country will display in a listing accordion by that key.<\/p>\n<pre>[wordpress_store_locator_listing key=\"country\"]<\/pre>\n<p>The above example will list all stores by country. Of course you can use any other key like city or state if you want.<\/p>\n<figure id=\"attachment_6124\" aria-describedby=\"caption-attachment-6124\" style=\"width: 1020px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-6124\" src=\"https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2020\/10\/store-locator-listing-by-country-1024x677.png\" alt=\"store locator listing by country\" width=\"1020\" height=\"674\" srcset=\"https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2020\/10\/store-locator-listing-by-country-1024x677.png 1024w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2020\/10\/store-locator-listing-by-country-247x163.png 247w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2020\/10\/store-locator-listing-by-country-510x337.png 510w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2020\/10\/store-locator-listing-by-country-300x198.png 300w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2020\/10\/store-locator-listing-by-country-768x508.png 768w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2020\/10\/store-locator-listing-by-country-1536x1016.png 1536w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2020\/10\/store-locator-listing-by-country-2048x1355.png 2048w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><figcaption id=\"caption-attachment-6124\" class=\"wp-caption-text\">store locator listing by country<\/figcaption><\/figure>\n<h2>Listing Stores Arguments<\/h2>\n<p>All arguments you can use in the shortcode:<\/p>\n<ul>\n<li>open_by_default =&gt; &#8216;yes&#8217;,<\/li>\n<li>Group listing key (e.g. country)<br \/>key<\/li>\n<li>Order key by<br \/>key_orderby =&gt; &#8216;pm.meta_value&#8217;,<\/li>\n<li>Only show key with this value (e.g. US)<br \/>value<\/li>\n<li>heading_prefix =&gt; &#8216;Stores in &#8216;,<\/li>\n<li>Show a subkey (e.g. &#8220;region&#8221;)<br \/>subkey<\/li>\n<li>Order Subkey Data (e.g. pm.meta_value)<br \/>subkey_orderby<\/li>\n<li>Only show subkey with this value (e.g. Texas)<br \/>subvalue<\/li>\n<li>Prefix for subkey Heading (e.g. State:)<br \/>subheading_prefix<\/li>\n<li>Category ID filtering<br \/>category<\/li>\n<\/ul>\n<pre>[wordpress_store_locator_listing key=\"country\" value=\"US\" subkey=\"region\" subvalue=\"Texas\" heading_prefix=\"Stores in \" order_by=\"pm.meta_value\" subheading_prefix=\"State: \"]<\/pre>\n\t<div class=\"img has-hover x md-x lg-x y md-y lg-y\" id=\"image_762584896\">\n\t\t\t\t\t\t\t\t<div class=\"img-inner dark\" >\n\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1020\" height=\"250\" src=\"https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2021\/03\/listing-example-with-us-and-texas-stores-only-1024x251.png\" class=\"attachment-large size-large\" alt=\"listing example with us and texas stores only\" srcset=\"https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2021\/03\/listing-example-with-us-and-texas-stores-only-1024x251.png 1024w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2021\/03\/listing-example-with-us-and-texas-stores-only-247x60.png 247w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2021\/03\/listing-example-with-us-and-texas-stores-only-510x125.png 510w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2021\/03\/listing-example-with-us-and-texas-stores-only-300x73.png 300w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2021\/03\/listing-example-with-us-and-texas-stores-only-768x188.png 768w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2021\/03\/listing-example-with-us-and-texas-stores-only-1536x376.png 1536w, https:\/\/www.welaunch.io\/en\/wp-content\/uploads\/sites\/8\/2021\/03\/listing-example-with-us-and-texas-stores-only-2048x501.png 2048w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/>\t\t\t\t\t\t\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\n<style>\n#image_762584896 {\n  width: 100%;\n}\n<\/style>\n\t<\/div>\n\t\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","product_cat":[],"class_list":["post-6123","faq","type-faq","status-publish","hentry","faq_topics-store-locator","faq_topics-store-locator-faq","faq_topics-store-locator-shortcodes"],"_links":{"self":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/6123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq"}],"about":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/types\/faq"}],"author":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/comments?post=6123"}],"version-history":[{"count":4,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/6123\/revisions"}],"predecessor-version":[{"id":19080,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/faq\/6123\/revisions\/19080"}],"wp:attachment":[{"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/media?parent=6123"}],"wp:term":[{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.welaunch.io\/en\/wp-json\/wp\/v2\/product_cat?post=6123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}