Suntimes Widget

Displays sunrise and sunset times for locations in widgets

Download (554 downloads)

Latest version: Download Suntimes Widget v0.9.2 [zip]


This section describes how to install the plugin and get it working.

  1. Go to the Plugins page in the admin area, search for suntimes widget and install it.
  2. Or Extract in the /wp-content/plugins/ directory. This will create a subfolder called suntimes-widget containing the plugin files.
  3. Activate the Suntimes Widget through the ‘Plugins’ menu in WordPress
  4. Go to appearance->widgets, add the widget to a widget area and then add the title, latitude and longitude.
  5. Google Maps will give you a longitude and latitude of the location you would like the sunrise and sunset times for.


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.





9 thoughts on “Suntimes Widget

  1. Debbie

    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?

    1. Jon Post author

      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

    1. Jon Post author

      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.


  2. Tom

    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

    1. Jon Post author

      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.


  3. Tom

    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


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>