Store Locator Plus for WordPress Forums Premier Support Location Fields – location category

This topic contains 14 replies, has 2 voices, and was last updated by  Cici 6 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #58799

    imagei
    Participant

    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

    #58803

    Cici
    Keymaster

    Not 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/

     

     

     

    #58813

    imagei
    Participant

    Thanks Cici

    I have a number of locations – each fall into one of 3 categories.
    https://2018.unitedayurveda.com/find-a-member/search

    I’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 6 months, 3 weeks ago by  imagei.
    #58824

    Cici
    Keymaster

    you 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?

     

    #58825

    Cici
    Keymaster

    oh 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.

     

    #58828

    imagei
    Participant

    Umm – 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.

    #58841

    Cici
    Keymaster

    Ok, 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?

     

     

    #58845

    imagei
    Participant

    Thanks 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

    #58851

    Cici
    Keymaster

    The 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.

     

    #58862

    imagei
    Participant

    OK – 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]’ ??

    #58902

    Cici
    Keymaster

    just 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.
    #58948

    imagei
    Participant

    Thanks 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?

    #58950

    Cici
    Keymaster

    Let 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.

    #58953

    imagei
    Participant

    Thank 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/search

    Very grateful for your persistence here.

    Pete

    #58957

    Cici
    Keymaster

    Sometimes 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.

     

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.