Skip Navigation

[Resolved] Map search drop downs

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#2678530
Map.jpg

Tell us what you are trying to do? I currently have a legacy map view on my homepage. I have it set to categories to show business listings. First issue for me is that in order to pull the category term into other places throughout my site, I have only checked the child category to show (by not checking the parent category) typically via elementor headings, etc. I think this is messing up the category hierarchy of my map dropdown filter.

Not sure if I need another ticket for this but I'd also like to have 3 total drop downs for 3 different post types to all show on the map with different colored markers. Businesses is where the hierarchy issue is and I'd like to add my events and attractions post types to the map as well.

Is there any documentation that you are following? I haven't found anything related in my searching.

Is there a similar example that we can see? On the homepage of the site down towards the bottom there is the map and you can see what is happening.

What is the link to your site? hidden link

Any help would be greatly appreciated. Thanks for everything you do. <3

#2678614

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

all-options-always.png

Hi,

Thank you for contacting us and I'd be happy to assist.

In the view's 'Custom Search Settings', you can select the option 'Always show all values for inputs' ( example screenshot attached ) and the search fields will include all the terms.
( Including the parent terms which are not directly attached and are attached through child terms )

For the other part of the ticket, I'll need to see how these post types and the taxonomies are set up in the admin area.

Can you please share temporary admin login details, along with the link to the page where this view with multiple post types, can be seen?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2679377

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

The access details worked, thank you.

I'll be reviewing the setup and will perform some tests on my website. Will share the findings, as soon as this testing completes.

Thank you for your patience.

#2679552

Hi Waqar. I appreciate you having a look into it. I'll be here and thanks again!

#2680144

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

multiple-post-types.png

Thank you for waiting and here are steps for what you're planning for your view:

1. Showing multiple post types:

In the view's 'Content Selection' settings, you can select multiple post types to show the results from. For example, in the attached screenshot 'multiple-post-types.png', I've selected two post types, 'Shops' and 'Books'.

2. Different map markers for different post types:

The map marker shortcode 'wpv-map-marker' for each type of post type can be placed inside the post type conditional check.

For example:

[wpv-conditional if="( '[wpv-post-type]' eq 'shop' )"]
[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_icon='{URL for marker image for shop}' marker_field='wpcf-shop-address'][/wpv-map-marker]
[/wpv-conditional]

[wpv-conditional if="( '[wpv-post-type]' eq 'book' )"]
[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' marker_icon='{URL for marker image for book}' marker_field='wpcf-book-address'][/wpv-map-marker]
[/wpv-conditional]

In the above example, each conditional block will check if the current post in the loop is of type 'shop' or 'book' and then add the map marker icon, accordingly.

Note: You'll replace '{URL for marker image for shop}' and '{URL for marker image for book}' with the actual URL of map marker icons/images for each post type.

Relevant documentation links:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-type
https://toolset.com/documentation/legacy-features/views-plugin/using-shortcodes-in-conditions/
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-marker

I hope this helps and please let me know if you need further assistance.

jasonw-2 confirmed that the issue was resolved on 2024-01-29 23:11:41.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.