Skip to content

Instantly share code, notes, and snippets.

@agilelogix
Last active September 22, 2023 23:01
Show Gist options
  • Save agilelogix/c1dce7c4fe1eb0b84604ff53f9a256b0 to your computer and use it in GitHub Desktop.
Save agilelogix/c1dce7c4fe1eb0b84604ff53f9a256b0 to your computer and use it in GitHub Desktop.
Store Locator WordPress Customization
1- Social Media Links
---------------------
<div class="sl-row">
<div class="pol justify-content-center text-center">
{{if facebook_url}}
<a target="_blank" href="{{:facebook_url}}" class="btn btn-asl">Facebook</a>
{{/if}}
{{if twitter_url}}
<a target="_blank" href="{{:twitter_url}}" class="btn btn-asl">Twitter</a>
{{/if}}
{{if instagram_url}}
<a target="_blank" href="{{:instagram_url}}" class="btn btn-asl">Instagram</a>
{{/if}}
</div>
</div>
2- Add a Website Button
-----------------------
{{if website}}
<div class="sl-row">
<div class="pol-md-12 mt-10">
<a href="{{:website}}" class="btn btn-asl btn-block">View Site</a>
</div>
</div>
{{/if}}
3- Add a Website Button with Custom Text
----------------------------------------
{{if website}}
<div class="sl-row">
<div class="pol-md-12 mt-10">
<a href="{{:website}}" class="btn btn-asl btn-block">{{if website_text}}{{:website_text}}{{else}}View Site{{/if}}</a>
</div>
</div>
{{/if}}
4- Remove the Stores opening hours
----------------------------------
{{if open_hours}}
<li class="sl-hours">
<i class="icon-clock"></i>
<span class="txt-hours">{{:open_hours}}</span>
</li>
{{/if}}
5- Remove the Stores Days
-------------------------
{{if days_str}}
<li class="sl-days">
<i class="icon-calendar"></i>
<span class="txt-hours">{{:days_str}}</span>
</li>
{{/if}}
6- Add the Categories Image, instead of the Names
-------------------------------------------------
{{if c_names}}
<li class="sl-categories">
<ul class="inner-cat-list">
{{for categories}}
<li>
<a><img src="{{:URL}}svg/{{:icon}}" alt="{{:name}}" width="60"></span></a>
</li>
{{/for}}
</ul>
</li>
{{/if}}
7- Change the Background Color for a specific Store
---------------------------------------------------
<div class="sl-item" data-id="{{:id}}" {{if store_color}}style="background-color:{{:store_color}} !important"{{/if}}>
Plugin:
https://agilestorelocator.com/
https://wordpress.org/plugins/agile-store-locator/
#WordPress #StoreLocator #Plugin #GoogleMaps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment