You can include the category names in the search results by using the wpsl_store_meta filter to collect the category names, and the wpsl_listing_template and wpsl_info_window_template filters to show them in the templates.
Collect the Used Categories
The code example below shows how to collect the category data for each location with wp_get_post_terms and assign the returned category names to the ‘terms’ key.
If a location is assigned to multiple categories, then the category names are separated by a comma (line 18).
Show the Category Names in the Templates
After collecting the category names you still need to show them in the used templates.
Search Results Template
The code below shows the search results template with the category names placed directly below the address details ( line 24 – 26 ).
Marker Info Window Template
If you also want to show the used categories in the marker info window, then you can use the code example below. The category data is included between line 16 and 18.
All code examples need to go in the functions.php inside your active theme folder.
Make sure to flush the cache from any possible caching plugins, your browser cache, and the WPSL transient cache on the WPSL settings page before reloading the store locator page.