Title: SunnyTracker Widgets
Author: SunnyTracker
Published: <strong>ستمبر 30, 2026</strong>
Last modified: ستمبر 30, 2026

---

Search plugins

![](https://ps.w.org/sunnytracker-widgets/assets/banner-772x250.png?rev=3720804)

![](https://ps.w.org/sunnytracker-widgets/assets/icon-256x256.png?rev=3720804)

# SunnyTracker Widgets

 By [SunnyTracker](https://profiles.wordpress.org/andrelyonberg/)

[Download](https://downloads.wordpress.org/plugin/sunnytracker-widgets.1.2.0.zip)

 * [Details](https://bcc.wordpress.org/plugins/sunnytracker-widgets/#description)
 * [Reviews](https://bcc.wordpress.org/plugins/sunnytracker-widgets/#reviews)
 *  [Installation](https://bcc.wordpress.org/plugins/sunnytracker-widgets/#installation)
 * [Development](https://bcc.wordpress.org/plugins/sunnytracker-widgets/#developers)

 [Support](https://wordpress.org/support/plugin/sunnytracker-widgets/)

## Description

Show your visitors when the sun rises and sets – on a campsite, hotel, wedding venue,
sailing club, fishing or photography blog. Everything updates itself every day.

**Made for photographers**

The **Photo light** card shows the day’s blue and golden hours on a 24-hour bar,
what is on now or next with a live countdown, and where the sun rises and sets –
in degrees and as a compass point. The large size adds the moon phase with moonrise
and moonset. For photo spot guides, workshops and photo tours, and for landscape,
wedding or astro photography blogs.

As text in your theme’s style, `[sunnytracker_times city="reykjavik" show="photo"]`
lists the blue and golden hours, sunrise and sunset with their direction, and the
moon phase. In the “Sun & moon times” block it is one click: “Photography preset”.

**Two blocks for the block editor**

 * **SunnyTracker widget** – a small card: sunrise & sunset with day length, moon
   phase with moonrise and moonset, golden hour, photo light, or a countdown to 
   the next solar or lunar eclipse. Light, dark or following the visitor’s mode,
   three sizes, ten languages, your accent colour. Try them all on [sunnytracker.com/widgets](https://www.sunnytracker.com/widgets).
 * **Sun & moon times** – the day’s times as plain text in your theme’s fonts and
   colours: sunrise and sunset with their direction, solar noon, sun height at noon,
   civil, nautical and astronomical twilight, blue and golden hour, day length, 
   moonrise, moonset and moon phase. Pick the fields, list or table, today or tomorrow.
   Search engines read it like the rest of your page.

Both blocks have a city search built in. For a place outside town – a campsite, 
a beach, a venue – use coordinates instead.

**Shortcodes** for the classic editor, page builders and text widgets, including
a single time inside a sentence: “Sunset tonight: `[sunnytracker_time city="hamburg"
field="sunset"]`”.

**Sidebar widget** for classic themes under Appearance  Widgets.

**Settings  SunnyTracker** sets the default city, language and colours for the whole
site.

Times are calculated by [SunnyTracker](https://www.sunnytracker.com) with the NOAA
solar algorithm (refraction included) and Meeus lunar theory. Polar night and midnight
sun are handled. No account and no API key needed.

### Shortcodes

Card:

    ```
    [sunnytracker city="berlin" type="golden-hour" theme="dark" size="large" lang="de" accent="3b82f6"]
    ```

 * `city` – the city’s slug as in its SunnyTracker address (sunnytracker.com/new-
   york  `new-york`)
 * `type` – `sunrise` (default), `moon`, `golden-hour`, `photo`, `solar-eclipse`,`
   lunar-eclipse`
 * `theme` – `light`, `dark`, `auto`
 * `size` – `compact`, `default`, `large`
 * `lang` – `en`, `de`, `fr`, `es`, `it`, `pl`, `nl`, `pt`, `ja`, `zh`
 * `accent` – colour as hex without #

Times as text:

    ```
    [sunnytracker_times city="berlin" show="sunrise,sunset,day_length,moon_phase" layout="table" date="tomorrow"]

    [sunnytracker_times lat="54.18" lon="7.89" tz="Europe/Berlin" name="Heligoland harbour"]
    ```

 * `show` – any of `astronomical_dawn`, `nautical_dawn`, `civil_dawn`, `blue_hour_morning`,`
   golden_hour_morning`, `sunrise`, `sunrise_direction`, `solar_noon`, `noon_altitude`,`
   sunset`, `sunset_direction`, `golden_hour_evening`, `blue_hour_evening`, `civil_dusk`,`
   nautical_dusk`, `astronomical_dusk`, `day_length`, `moonrise`, `moonset`, `moon_phase`–
   or `photo` for the photographer’s selection
 * `layout` – `list` (default) or `table`
 * `date` – `today` (default), `tomorrow` or `YYYY-MM-DD`
 * `title` – `yes` (default) or `no` for the heading with place and date
 * `lat`, `lon`, `tz` – coordinates and time zone instead of a city; `name` – the
   place name for the heading

A single value:

    ```
    [sunnytracker_time city="berlin" field="sunset" date="tomorrow"]
    ```

All shortcodes and blocks take `credit="yes"` or `credit="no"` for the source link;
without it the site-wide setting applies.

### External services

This plugin relies on SunnyTracker ([www.sunnytracker.com](https://www.sunnytracker.com)),
which computes the sun and moon times. Without it the plugin shows nothing.

 * **Cards** (block “SunnyTracker widget”, shortcode `[sunnytracker]`, sidebar card):
   the visitor’s browser loads the card as an iframe from www.sunnytracker.com each
   time a page with it is viewed. Like any web request this sends the visitor’s 
   IP address, browser user agent and the address of the page it is embedded in,
   plus the chosen city and display options. SunnyTracker counts these views anonymously;
   it sets no cookies and stores nothing on the visitor’s device.
 * **Text times** (block “Sun & moon times”, shortcodes `[sunnytracker_times]` and`[
   sunnytracker_time]`): your web server requests https://www.sunnytracker.com/api/
   v2/sun with the chosen city or coordinates, time zone and date, at most once 
   per place and day (answers are cached). Nothing about your visitors is sent. 
   The request carries your site’s address in the user agent.
 * **City search** in the block editor: your web server sends the typed search text
   to https://www.sunnytracker.com/api/v2/cities. Only logged-in editors can use
   it.

SunnyTracker: [privacy policy](https://www.sunnytracker.com/privacy) – [legal notice](https://www.sunnytracker.com/imprint)–
[API documentation](https://www.sunnytracker.com/developers)

## Screenshots

[⌊A campsite page with the "Sun & moon times" block for its coordinates and two 
cards: golden hour and moon phase.⌉⌊A campsite page with the "Sun & moon times" 
block for its coordinates and two cards: golden hour and moon phase.⌉[

A campsite page with the “Sun & moon times” block for its coordinates and two cards:
golden hour and moon phase.

[⌊The "Sun & moon times" block in the editor: place, day and the fields to show.⌉⌊
The "Sun & moon times" block in the editor: place, day and the fields to show.⌉[

The “Sun & moon times” block in the editor: place, day and the fields to show.

[⌊The "SunnyTracker widget" block with city search, widget type, size, colours and
language.⌉⌊The "SunnyTracker widget" block with city search, widget type, size, 
colours and language.⌉[

The “SunnyTracker widget” block with city search, widget type, size, colours and
language.

[⌊Settings → SunnyTracker: defaults for the whole site, the optional source link
and a preview of the times.⌉⌊Settings → SunnyTracker: defaults for the whole site,
the optional source link and a preview of the times.⌉[

Settings  SunnyTracker: defaults for the whole site, the optional source link and
a preview of the times.

[⌊The Photo light card for photographers: blue and golden hour on a 24-hour bar,
a live countdown and the direction of sunrise and sunset – large with the moon, 
dark or light, in ten languages.⌉⌊The Photo light card for photographers: blue and
golden hour on a 24-hour bar, a live countdown and the direction of sunrise and 
sunset – large with the moon, dark or light, in ten languages.⌉[

The Photo light card for photographers: blue and golden hour on a 24-hour bar, a
live countdown and the direction of sunrise and sunset – large with the moon, dark
or light, in ten languages.

## Blocks

This plugin provides 2 blocks.

 *   SunnyTracker widget Sunrise & sunset, moon phase, golden hour, photo light 
   for photographers or an eclipse countdown for a city – as a small card.
 *   Sun & moon times Today's sunrise, sunset, twilight, golden and blue hour, sun
   direction, moonrise and moon phase for a city or coordinates – as text in your
   theme's style.

## Installation

 1. Install the plugin under Plugins  Add New and activate it.
 2. Optional: set your city and language under Settings  SunnyTracker.
 3. Add the block “SunnyTracker widget” or “Sun & moon times” to a post or page – or
    use a shortcode.

## FAQ

### How do I find the slug of my city?

The blocks have a city search. For shortcodes, search for your city on [sunnytracker.com](https://www.sunnytracker.com)
and take the last part of the address, e.g. `new-york` from sunnytracker.com/new-
york.

### Which card suits a photography site?

“Photo light” (`type="photo"`): the blue and golden hours on one bar, a countdown
to the next good light and the direction of sunrise and sunset. As text, `show="
photo"` gives the same in your theme’s style.

### Does the plugin add a link to my site?

Only if you want it: a small “SunnyTracker” source link can be switched on under
Settings  SunnyTracker or per block and shortcode. It is off by default.

### Does it set cookies or slow down my pages?

No cookies. The text times are fetched on your server once per place and day and
then cached, so your pages do not wait for SunnyTracker. The cards load lazily as
iframes. Details under “External services”.

### The card is cut off in a narrow column

The cards have a fixed width: 280 px (compact), 320 px (default) or 380 px (large).
In a narrow column or sidebar choose “Compact”, or use the “Sun & moon times” block,
which fits any width.

### What if SunnyTracker cannot be reached?

Visitors see nothing where the times would be; logged-in editors see a short note.
The plugin tries again after ten minutes.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“SunnyTracker Widgets” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ SunnyTracker ](https://profiles.wordpress.org/andrelyonberg/)

[Translate “SunnyTracker Widgets” into your language.](https://translate.wordpress.org/projects/wp-plugins/sunnytracker-widgets)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/sunnytracker-widgets/),
check out the [SVN repository](https://plugins.svn.wordpress.org/sunnytracker-widgets/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/sunnytracker-widgets/)
by [RSS](https://plugins.trac.wordpress.org/log/sunnytracker-widgets/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.0

 * New card “Photo light” (`type="photo"`) for photography sites: the day’s blue
   and golden hours on a 24-hour bar, a live countdown to the next good light, and
   the direction of sunrise and sunset; the large size adds the moon.
 * New text fields `sunrise_direction` and `sunset_direction`, in degrees and as
   a compass point.
 * New `show="photo"` for `[sunnytracker_times]` and a “Photography preset” in the“
   Sun & moon times” block.

#### 1.1.0

 * New block “Sun & moon times” and shortcodes `[sunnytracker_times]` / `[sunnytracker_time]`:
   the day’s times as text – sunrise, sunset, twilight, golden and blue hour, day
   length, moonrise, moonset, moon phase – for a city or coordinates.
 * New block “SunnyTracker widget” with city search and live preview.
 * New sidebar widget for classic themes.
 * New settings page for site-wide defaults; the language follows the site language.
 * The source link is now opt-in, site-wide or per widget.

#### 1.0.0

 * First release.

## Meta

 *  Version **1.2.0**
 *  Last updated **2 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.3 or higher **
 *  Tested up to **7.1.2**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/sunnytracker-widgets/)
 * Tags
 * [moon phase](https://bcc.wordpress.org/plugins/tags/moon-phase/)[photography](https://bcc.wordpress.org/plugins/tags/photography/)
   [sunrise](https://bcc.wordpress.org/plugins/tags/sunrise/)[sunset](https://bcc.wordpress.org/plugins/tags/sunset/)
 *  [Advanced View](https://bcc.wordpress.org/plugins/sunnytracker-widgets/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/sunnytracker-widgets/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/sunnytracker-widgets/reviews/)

## Contributors

 *   [ SunnyTracker ](https://profiles.wordpress.org/andrelyonberg/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/sunnytracker-widgets/)