Store Locator Plus® for WordPress › Forums › Premier Support › Location Fields – location category
Tagged: Location fields
- This topic has 14 replies, 2 voices, and was last updated 5 years, 8 months ago by Cici.
-
AuthorPosts
-
February 26, 2019 at 9:46 AM #58799imageiParticipant
Hi Cici
I’ve found this cheatsheet.
https://docs.storelocatorplus.com/blog/data-fields-to-display-in-results/Is there a shortcode to retrieve a location’s category? something like [slp_location data.sl_category]?
Thanks
February 26, 2019 at 1:02 PM #58803CiciKeymasterNot sure what you mean by retrieve category,. If you mean to display on a page yes: “only_with_category =”xx” would display the category or categories (separated by a comma if more then one)
For more extended attributes that can be used with shortcodes see
https://docs.storelocatorplus.com/blog/slplus-shortcode-options/
February 26, 2019 at 4:25 PM #58813imageiParticipantThanks Cici
I have a number of locations – each fall into one of 3 categories.
https://2018.unitedayurveda.com/find-a-member/searchI’d like the category a location has been assigned to be displayed along with the name, telephone, website etc in the results.
That way the searcher will easily know what type of location they are looking at.
I wonder if it is possible?
Thanks
- This reply was modified 5 years, 9 months ago by imagei.
February 27, 2019 at 1:03 PM #58824CiciKeymasteryou can add a legend, to display the icons or markers with the category label. there are some locator styles under view that include it and you can check off the category legend under settings/view. it is further down just above the css box under the styles under vierw
https://docs.storelocatorplus.com/blog/store-and-category-manager/
is that what you are referring to?
February 27, 2019 at 1:07 PM #58825CiciKeymasteroh i see your site you have the legend, you want the icon or name of category to show next to marker as map bubble or in results boxes themselves?
you can add css rule for either. not sure off the top of my head what the exact data field name is.
February 27, 2019 at 2:24 PM #58828imageiParticipantUmm – not really Cici.
I’m trusting visitors will read the legend above the search / map and interpret the bubbles on the map OK.I’d like a location’s category to be displayed in the text results that are listed to the left of the map.
https://2018.unitedayurveda.com/find-a-member/search
So as they scan down the list they can see if the location is relevant without referring to the map first.
February 28, 2019 at 5:07 PM #58841CiciKeymasterOk, you may be able to add a line in the results layout for category and/or add the attribute as a div in css . (If you have not enabled the Experience add-on you will want to do that so you can change the layout and/or add CSS. )
I know that you can have tags show within the results layout.
I know you can have the category icon appear in the results .
there is a checkbox under Settings/Results Appearance section that is “show category icons” . if you check that off the category icon will appear within your results . On my site I have checked off to show the category icon but I have also added tags . , Tags are text and can be imported as well as work with categories.
https://docs.storelocatorplus.com/blog/results-layout-shortcodes-and-attributes/
You are not using the category selector on that site?
February 28, 2019 at 7:01 PM #58845imageiParticipantThanks Cici
I have installed and activated the Experience plugin.
there is a checkbox under Settings/Results Appearance section that is “show category icons” . if you check that off the category icon will appear within your results .
Ah. I have found this and checked it ON. But still no marker bubbles in the ‘text results’ – (still have marker bubbles on the map of course).
But then I have a customised my results so I guess I need to shortcode for the category?
[slp_location data.sl_category]
???You are not using the category selector on that site?
Ah – I see – that could be a solution.
Thanks
March 1, 2019 at 3:52 PM #58851CiciKeymasterThe category works under the WordPress taxonomy similar to pages. I double checked with lance and only the icon can be displayed, if you want text to display in thwe results layout you need to do that with tags. The tags can be the same as categories, tags are just text. Categories are not just text and they do not work exactly the same. i.e there is no shortcode to put in the results layout to display category slug.
I do not know what you mean by “marker bubbles” Do you mean the MAP INFO Bubble? or the location url control. Checking off the show icon will not display the category map marker it will show the category icon. Your categories can have both a marker and an icon. They can be the same or different. But only the icon will show.
March 2, 2019 at 3:00 PM #58862imageiParticipantOK – lets do it with tags. I can add a tag for each location.
How do I display the tag in the results?something like `[slp_location data.sl_tag]’ ??
March 6, 2019 at 3:00 PM #58902CiciKeymasterjust check off under results settings. half way down the page in back end you will see a function to call out how to display them
Show tags in output use the drop down menu and select
choices are: as entered,
hidden
,on separate lines
Attachments:
You must be logged in to view attached files.March 10, 2019 at 4:07 PM #58948imageiParticipantThanks for looking into this Cici
Not showing up for me. But heh maybe that’s because I have customised my results.
Is there a [shortcode] for tags that I could add?
March 11, 2019 at 11:42 AM #58950CiciKeymasterLet me test it on my site.
My results layout has the shortcode [slp_location pro_tags]
When I select on back end , the show tags on separate lines , and inspect the in style element using browser console tool in front end I see my tags for my location and the lodging, entertainment, restaurant tags I had added to that particular location show (below.) my SLP plugin style is Bobbitt
<div class=”Lodging_br__entertainment_br__restaurant slp_result_table_tags”><span class=”tagtext”>Lodging<br>entertainment<br>restaurant</span></div>
I am not an expert on CSS , not sure why the show tags isnt working on front end for you. I checked another SLP test site that was using SEO Pages the tag only seems to show in the map bubble.
So I do not know if that is what the issue is or not, will have to discuss with the developer, as he mentioned in another post Results Layouts settings and SEO pages are different.
March 13, 2019 at 6:11 AM #58953imageiParticipantThank you Cici. This is excellent. 🙂
I downloaded the csv location export and copied the category into to the sl_tags column then added the shortcode [slp_location pro_tags] to my SLP > Settings > Results Layout.
https://apa.uk.com/find-a-member/searchVery grateful for your persistence here.
Pete
March 13, 2019 at 3:36 PM #58957CiciKeymasterSometimes I just get lucky (if I am persistent). I checked your site again, it looks pretty nice, I see the descriptive tag text in the results there so it appears you were successful and see the <div class=”Practitioner slp_result_table_tags”><span class=”tagtext”>Practitioner</span></div> when I inspect with the browser tools. Inspecting sites using browser tools was a valuable instruction given to me by Lance when i first started learning his plugin. But I am a casual user. I learn as much from the customer when they provide feedback, so thank you for letting me know the steps you took! Not many people use both categories and tags , but i will take a look at the docs to see if i can add more detail.
-
AuthorPosts
- You must be logged in to reply to this topic.