Displays sunrise and sunset times for locations in widgets
Download (342 downloads)
Latest version: Download Suntimes Widget v0.9.2 [zip]
Installation
This section describes how to install the plugin and get it working.
- Go to the Plugins page in the admin area, search for
suntimes widgetand install it. - Or Extract
suntimes-widget.zipin the/wp-content/plugins/directory. This will create a subfolder calledsuntimes-widgetcontaining the plugin files. - Activate the
Suntimes Widgetthrough the ‘Plugins’ menu in WordPress - Go to
appearance->widgets, add the widget to a widget area and then add the title, latitude and longitude. - Google Maps will give you a longitude and latitude of the location you would like the sunrise and sunset times for.
FAQ
Q. Where are the options?
A. On the widget page.
Q. Where to report bugs, ask for support or suggest features?
A. At the plugin page.
Trying to install your plugin on my B&B site. Great idea, and I think folks will find it interesting. However, the times are not right for my lat/long. I live in Tok, AK which is 63 lat, 143 long. Can you help?
Thank you for bringing this to my attenetion (it was a caching problem). It should not be an issue tomorrow, and will hopefully fix itself when it looks for tomorrows times! But I have found the cause of the bug and will push a fix later today. I’m glad someone with such varying daylight hours is interested in this plugin.
Cheers Jon
Thanks for looking into that so quickly. Only now, nothing is showing up after the title!
Thanks,
Deb
Hello again, Jon.
The widget is working wonderfully. We have had requests for non-military time. any possibility of that?
Thanks again!
Deb
I have just had a go at doing this, have emailed you a copy to test and will upload it as an update to the plugin repository soon provided there are no problems.
Cheers
Jon
Jon
Set up was very easy on AppTheme’s Vantage, and works perfectly. Using the google map lat/lon selection idea was brilliant!
Have two questions.
1. What code would I replace to change from military time (14.:30) to regular time 2:30? (I don’t need am or pm)
2. What code should I delete to only show the Sunset time?
Thank you in advance.
tom edwards
I am glad it works well for you. To remove the am/pm just delete the a at the end of line 52. To only show sunset time delete
<li>Sunrise: <?php echo $suntimes['rise'] ?></li>from line 91.Cheers
Jon
Thanks for the quick reply – I’ll give it a shot
tom
Jon
Sunrise removed exactly as described
Unfortuately Apptheme’ editor removes Line numbers so it is a little hard to figure out which “a” to delete. Could you give me a little code snipet so I could search for it?
Also what to make sure removing the “a” changes from time from 14:30 to 2:30. I can live with AM/PM, just some people don’t know what time 14:30 is.
Thanks for your help