Support Request: Enable Weather Element with Geolocation in Newspaper

Posted in: Newspaper
Post count: 2

Hello TagDiv Support,

I’m currently using the Newspaper theme and would like to display weather information in my site’s header. I noticed that the built-in Weather element in the TagDiv Composer only supports manual entry of a city name, but does not allow for automatic geolocation-based weather display for users.

Here’s what I’m trying to achieve:

Show the current weather icon + temperature + city name
Automatically detect the user’s location via geolocation (browser-based)
Display weather dynamically for each visitor (e.g. someone in Nairobi sees Nairobi weather, someone in Paris sees Paris weather)

I attempted to use a custom script via a Raw HTML block, but it appears that script tags are either stripped or not executed in certain theme areas (like headers). I also tried using the Weather element, but it requires a static city name and doesn’t support location detection.

Could you please let me know:

1. Is there a supported way to integrate geolocation-based weather with the theme?
2. Can I use the existing Weather element to achieve this with dynamic location?
3. If not, what is the recommended method for safely adding a custom weather script that supports geolocation?

I’d really appreciate any guidance or best practices to make this work cleanly within the theme structure.

Thank you in advance!

Best regards,
Martin
Website: https://africanewsreport.com

Post count: 35449

Hi Martin,

The best solution if the plugin provide a shortcode is to use that shortcode and use the tagDiv Composer and use a column text or text with title element to set the map, set the code in text zone, here – https://imgur.com/DSSni9j

If is a js then as you did it should be set in a Raw HTML between script tags and assure that is nothing interfere with it.

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.