O just to make sure we are on the same page I will not be able to add a drop down filter to a different page that would take the user to the results on the current maps page we have now.
What part of the documentation leads you to say that?
Sorry I miss-understood "You have the option to insert only the search form when you insert the View shortcode.". I just saw the word only.
Afternoon Christian,
How would I create a button to switch between regular and seasonal locations on the map? I have seasonal set up as a category for location already. I guess I can add it to the same view as the map dropdown and search?
I'm not 100% sure I understand how this would work. It seems like you have included Seasonal as one term in the Location Services taxonomy. You already have one filter set up for the Location Services taxonomy. It's not possible to create two filters for the same taxonomy, and it's also not really possible to create a filter for toggling one single term in a taxonomy. So I think this is not the best approach. Normally to filter between "A" and "B" options, you use a custom field radio button to store option A or B for each post, then add that as a custom field filter in your View. Is that possible for your situation?
Yes thats possible. I could then just style the radio inputs to look like buttons. Could I use the same map to display the results?
Yes, you can combine those radio inputs I mentioned with the current distance filter and location services filter, and display the results on the same map. Or, you can create a new View with only the radio inputs and display the results using the same map shortcode, placed somewhere else on the site.
nice! Would i need to figure out a different way to filter it or can I use my existing taxonomy category of seasonal?
Would you be able to take a look at the radio I added the view. Its showing all of the location services again.
I see the locations services taxonomy dropdown filter but no radio filter. If you want to add a radio button filter for a custom radio field, edit the View. Scroll up to the Query Filter panel and delete the existing Query Filter for the custom field. Then scroll back down to the Search and Pagination editor panel and click New Filter. Add the custom field filter here and choose the radio button option to display the filter. The Query Filter will be updated automatically to match the filter control you create in the Search and Pagination panel.
I did previously add a radio button but it was showing all of the services in a list. I just need it to show the seasonal option and show the relating map markers. I think where I get confused is the proper groups and fields to choose. So once im in the insert a custom filter window what group should I pick? Field group for locations Location services? Then after I have chosen a field or group how do I edit the filter by post field location window to just have a yes or no for seasonal. Can you explain it to me step by step?
So I guess the map would show all locations and when you click the radio button it will show the seasonal location that will have a different Marker
I have the radio set up in there now but its not effecting the map.
You haven't created a radio custom field anywhere to store a value for seasonal or non-seasonal. You've created a radio filter control linked to an existing WYSIWYG field that has nothing to do with seasonal or non-seasonal, it just happens to be called Location Services. Here are the steps you need to take to get this working.
- Create a new custom radio field in the "Field Group for Locations" field group. The radio button should have two options - one for seasonal and another for non-seasonal.
- Edit every Locations post and assign a seasonal or non-seasonal value in the custom field you just created.
- Edit the map-search View and remove the Query Filter for the location-services custom field
- Scroll down to the Search and Pagination panel and remove the filter control shortcode associated with location-service:
[wpv-control-postmeta field="wpcf-location-services" type="radios" source="custom" url_param="wpv-wpcf-location-services" values="," display_values="Regular,Seasonal"]
- Now click "New Filter" above the Search and Pagination panel and create a new filter for the radio field you created and populated in every location post.