Skip Navigation

[Resolved] jamal please

This support ticket is created 3 years, 7 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: Africa/Casablanca (GMT+01:00)

This topic contains 11 replies, has 2 voices.

Last updated by Jamal 3 years, 6 months ago.

Assisted by: Jamal.

Author
Posts
#1718015

hi jamal the othe help thread is closed https://toolset.com/forums/topic/adding-a-marker-to-a-map/page/4/#post-1718007
could you please re open i have just added a post the shortcode part is done just need help to get the markers onto the same map

many thanks

#1718203

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Martin,

I can ask the system team to reopen the ticket, but that should wait for Monday. And I'll be working on Tuesday.

The most important is to help you implement what do you need and build your site with Toolset. So I'll try to reply here and we'll keep that ticket closed unless you have another opinion.

The trick is to have the same map_id for the data pulled by the view, and the data pulled from the post content template. Your view did not have any markers. Check this screenshot hidden link

The "Trials" or event_venues do not us a Toolset address field and use two custom fields holding the latitude and longitude. So, we need to pass those to the marker shortcode as follow:

[wpv-map-marker map_id='map-14' marker_id='marker-[wpv-post-id]' lat='[wpv-post-field name='_VenueLat']' lon='[wpv-post-field name='_VenueLng']']
My Post Id: [wpv-post-id]
[/wpv-map-marker]

The view query has also a wrong filter. We are not querying based on any relationship hidden link

We need to query the posts that have the following IDs, check this filter hidden link

For some reason, the view returns all the venues. And I think that the shortcode is wrong some way, especially as it displays also a strange string ("]) check this screenshot hidden link
That is probably crashing the view's filter. And the view returns all the posts instead of filtering by IDs.

I tried to check the shortcode code, but I could not find it in the theme's functions.php file or in the custom code section in Toolset->Settings.

Can you point me to where the shortcode related_venues code is defined?

Best regards,
Jamal

#1718211

thanks jamal the function is now a plugin

hidden link

the plugin is called club venues .

thank you ever so much

#1718227

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you, Martin.

The shortcode was wrapping the IDs in a <h4> tag. And that will break the view as it only expects IDs separated by a comma. Check this screenshot hidden link

I updated the shortcode code to only return IDs.

But I still get errors and it is not working. So, I commented to code on the template file single-organizer.php and I tried it inside the content template, still no luck. The Toolset debug screen shows that the view is not found. Check this screenshot hidden link

I created another view, to no avail.

This will need some more debugging or assistance from our 2nd Tier.

I'll be off for two days. If you need urgent assistance and would not prefer to wait until Tuesday, just reply here, I'll check it and I'll ask a colleague to work on it on Monday.

Best regards,
Jamal

#1718231

thanks jamal , did some thing hppen tio the site i see the page is nit right?
thanks

#1720447

its the toolset view/template distorting the organizer page , rest of site is fine . thnks

#1720559

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Martin, I am sorry but I do not understand what do you mean by your last message.

Regarding our issue, I still think that the shortcode is generating something extra that breaks the view, or at least it is generating it when used inside code using "do_shortcode". Check this screenshot when I remove the shortcode and put its value instead of it hidden link

So I updated the code to use two lines and to omit using a shortcode inside a shortcode which "do_shortcode" seems to not accept, the current code is:

		<?php  $ids = do_shortcode('[related_venues]');?><hr>
		<?php echo do_shortcode("[wpv-view name='show-venue-on-club-map' ids='" . $ids . "']");?>

This gives some results, I hope they are correct. But the map only displays 2 markers from 5 results. Maybe the missing posts do not have Geolocation data, or do not match the view configuration(status=publish, etc.)
Check this screenshot.

Can you check other clubs and let me know if we are progressing or not.

#1720795

thanks jamal hope you had a good weekend off

using ths page as an example
hidden link

there are now 5 markers , the 3 that where missing i have added a long and lat
example here this is a venue page hidden link
i ticked used lon/lat and entered a numerical value into each of the lon /lat fields.

so i think its just the way we are using the event calendars lon and lat.
let me look into this and come back to you .
as always many thanks , i really cant thank you enough , i know this has been a way out of the box pain in the butt....
martin

#1720833

hi jamal i believe the rest is down to my venues and the lack of all fields filled for geolocation , please give me a day or 2 to go through all venues and check the adresses , i think what you have done is functioning SPOT ON....

thanks jamal ill get back to this and let you know asap

#1720921

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you Martin 🙂

I hope everything will be ok. Looking forward to your reply.

#1721755
jamal3.png
jamal2.png
jamal 1.png

hey jamal so far all looking good i think this ticket will need separating but with your knowledge of my system i though be easier if i asked yourself
to help me sort through venues i decided to build my venue page that used a map and icon and a list of ALL venues including there addresses , this worked perfect and i can see all venues that need attention to the lat long.

i may as well finish this view off now.
list of venues here
front end here hidden link
the wp page hidden link
toolset view hidden link

3 issues to resolve (before returning to previous issue) i attach image to explain also
1: as the markers are from the events calendar data , how can set up my search filter for distance ?
2: when this filter functions how can i make it so the list under the map filters too.
3. in the search box , cn i have this ajax , so when typing it auto filters rather than having to type and press enter.

many thanks jamal

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/distance-filter-for-post-with-latitude-and-longitude-custom-fields/

#1721869

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hi Martin,

I created a new ticket for this request and I'll be replying there.

If you think that our original issue is now solved, please mark this ticket as resolved.

Thank you,
Jamal

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