I am trying to give a post type a specific map marker depending on a value from a custom field. I have a "Select" custom field where I have two options. When choosing option 1, I want that to be a marker. When choosing option 2, I want that to be another marker.
Is there any documentation that you are following?
Hello. Thank you for contacting the Toolset support.
As I understand (considering you are using views plugin), you want to display two different marker pins based on the custom select field value set to the specific post.
so, if the post having option 1 set display X marker icon and if the post having option 2 set display Y marker icon. If this is true?
- You can display different marker icons using the [wpv-conditional] shortcode.
For example:
[wpv-conditional if="( '[types field="your-field-slug"][/types]'eq '1')"]
// add your marker with marker icon X
[/wpv-conditional]
[wpv-conditional if="( '[types field="your-field-slug"][/types]' eq '2')"]
// add your marker with the marker icon Y
[/wpv-conditional]
Where:
- Adjust the value of your field slug and its associated value.
Only thing missing was that I had followed the Toolset guide in a way that I had created a Content Template to display markers. This was not mentioned in the reply but I figured it out.