Toggle dark and light mode
-
Good day,
Thank you for the wind direction in the latest update!
Is it possible to toggle between light and dark mode?
-
This topic was modified 5 months ago by
erbrown777.
The page I need help with: [log in to see the link]
-
This topic was modified 5 months ago by
-
Thanks!
Right now the plugin follows your device/theme setting automatically for light/dark mode.
A manual toggle (forcing light or dark) is possible to add—either as a shortcode option or as a small toggle button in the widget.
I’ve noted the request for a future update.
Thank you for the latest update with the Dark/Light/Auto theme shortcode. I am testing the update here https://staging.9ty9.co.za/
The shortcode for the PC view of the site is the following (a different shortcode is shown for mobile):
[spelhubben_weather layout="compact" map="0" theme="light" forecast="daily" animate=”1″ show="temp,wind,wind_dir,icon" wind_unit="knt"]I am seeing the following:
- Dark mode is still showing
- The wind direction icon is the incorrect direction.
- I am trying to show the wind in knots
Hi, thanks for testing and for the detailed feedback.
Most of what you’re seeing should be addressed in v1.9.3—specifically the theme override behavior and wind display inconsistencies.
When you get a chance after updating to 1.9.3, could you please retest the desktop shortcode and let me know if the following are correct:
theme="light"reliably forces light mode on desktop- the wind direction icon matches the wind direction shown
- wind speed displays in knots as expected
One quick note: in your original shortcode,
animate=”1″appears to use smart quotes. Please make sure it’s normal quotes:animate="1"(smart quotes can sometimes break shortcode parsing).If anything still looks wrong after 1.9.3, please send:
- a screenshot of the widget
- your browser + device
- the wind direction value (degrees) at the time you tested
Thank you!
I have updated my production site and everything is working fine, except the wind direction https://9ty9.co.za/
Here’s a link to a screenshot of the widget https://app.screencast.com/aoI8CsFyuBgr8
The wind at the time was SW (232 degrees)Tested on Brave on PC and Mobile, and FF on PC
Thanks — and thanks for the report and screenshots.
I’ve fixed the wind-direction issue in release v1.9.4:
- Corrected the compass mapping so 232° maps to “SW”.
- Fixed the arrow rotation so the triangle now points TO the wind bearing.
- Added a small frontend JS fallback so the rotation isn’t removed by WordPress’ HTML sanitiser.
Please update the plugin to v1.9.4, clear any caches, and reload the page. After that the widget should show “SW” for ~232° and the arrow should point the correct direction.
If it still looks wrong, please:
- Post a new screenshot, or
- Add this shortcode on a page to compare providers: [spelhubben_weather comparison=”1″ ort=”Cape Town”] (replace the place if you prefer).
I’ll follow up immediately if anything else is off.
Thanks again — glad you reported it!
It works! Thank you! Wind direction is VERY important for a surfing town, so this is very helpful.
Thanks for confirming — I’m really glad it’s working now.
And totally agree: in a surfing town, wind direction is critical, so I’m happy we got it corrected quickly. If you notice anything else (or have feature requests for surf/weather use-cases), feel free to post again.
Have a great day, and thanks again for taking the time to report it.
You must be logged in to reply to this topic.