Skip Navigation

[Resolved] Display post count inside marker hint

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 2 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2068401

Hello,

I have a CPT with a country field, and a map showing markers on each country where there are posts.

Question 1: Is there a way to display the post count on marker's hint using [wpv-found-count] or any other trick?

Question 2: Is there a way to keep the hint showing and not just on mouse hover?

#2068597

Hello,

Q1) It needs nested views, for example within the map marker shortcode, you can display a view shortcode, pass custom field "country" value as view shortcode attribute, for example "country":
https://toolset.com/course-lesson/passing-arguments-to-views/
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-view
Setup above post view as below:
- Query your CPT posts
- Filter by custom field "country" value = view's shortcode attribute "country"
- output the [wpv-found-count] shortcode

And if there are lots of markers in the same map, it will conducts performance problem.

Q2) There isn't such kind of built-in feature, you might consider custom codes, for example:
https://stackoverflow.com/questions/29796001/show-google-maps-infowindow-onload

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.