Skip Navigation

[Resolved] I have some issues pulling data into an archive loop

This support ticket is created 3 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/Karachi (GMT+05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Waqar 3 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#1918497

Hello,

I have some issues pulling data into an archive loop. It is about a dealer listing page.

hidden link

Issue 1: After every number, like zip code there's questionmark.
Issue 2: The URL loses it's colon : causing it to not work
Issue 3: In the Map View I added a pop-up window for the pin. Thinking it would be a great idea to give directions I created a link, which is a mixture of the Google Maps URL + Data from the data base. But it seems like it's stays blank. Also the letter N appears twice before the link.

Your help is greatly appreciated.

#1918517
#1920045

Hi,

Thank you for waiting.

During testing on my website, I was not able to reproduce the issue with the map marker's popup content.

To investigate this further, I'll need to test your website's view on a different server.

Do I have your permission to download a clone/snapshot of the website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

regards,
Waqar

#1920065

Hello,

Thank you for helping. Sure, go ahead and clone the site. Hopefully we'll find a solution to this.

Regrads,
Ben

#1921361

Hi Ben,

I've downloaded the duplicator package.

I'll keep you updated with my findings and thank you for your patience.

regards,
Waqar

#1929129

Hi Ben,

Thank you for waiting and I apologize for the delay in getting back on this.

I'm just finishing with the tests and will share my findings shortly.

regards,
Waqar

#1929575

First, thank you for waiting as this investigation took longer than I initially expected.

We have some internal tickets to improve how the complex content and HTML is handled inside the map marker pop-ups.
( ref: https://toolset.com/errata/cannot-add-shortcodes-to-toolset-address-field-marker-popup/ )

I'm afraid, I don't have a time estimate at the moment, but in my tests, this custom shortcode worked inside the marker pop-up, to show the link to Google Maps, with the location from the custom field:


add_shortcode('show_address_field_link', 'show_address_field_link_fn');
function show_address_field_link_fn() {
	$field_output = do_shortcode("[types field='post-location'][/types]");
	if(!empty($field_output)) {
		ob_start();
		echo '<a href="<em><u>hidden link</u></em>'.urlencode($field_output).'" target="_blank">Route plan</a>';
		return ob_get_clean();
	}
}

Please replace "post-location" with your location field's slug.

The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.

Then inside the "Pop-up content" field in the Map block, you can call this shortcode to show the Google Map link, like this:


[show_address_field_link]

Additionally, avoid using any line breaks or empty spaces inside the "Pop-up content" field, and the stray "n" letters won't show.

#2133065

Hi,

The fix for the issue with the map marker pop-ups has been covered in the latest release of Toolset Maps (2.0.9).

You're welcome to update and let us know through a new ticket, in case it still persists.

regards,
Waqar