GlobalQuranBLOG Read the Quran

Developers ·

Add prayer times to your website: the free MuslimSalat widget

A mosque, an Islamic school or a community website needs today's prayer times on its front page. The MuslimSalat widget does it with one line: choose a design, copy the code, paste it into your page. The times are the ones your city follows, and they update by themselves every day.

The MuslimSalat widget builder: settings for location, language, size, colours and Asr on the left, and widget designs such as Brass astrolabe and Sky dome showing London's prayer times
The widget builder at muslimsalat.com/code.

Make your widget

How to add it

  1. Open the widget builder and type your city.
  2. Choose the language (39 are available, or "match the visitor's browser"), the size (a card or a compact strip), the colours (dark, light or matching the visitor's device), and the Asr time (local default, one shadow for Shafi, two shadows for Hanafi).
  3. Keep or turn off the countdown to the next prayer.
  4. Pick one of six designs: Brass astrolabe, Sky dome, Mihrab window, Day thread, Illuminated page or Mihrab.
  5. Paste your free API key and copy the line of code into your page.

The code

It is a single frame, so it works in any website builder that accepts HTML (WordPress, Wix, Squarespace, Google Sites and plain HTML):

<iframe src="https://muslimsalat.com/code/mstimes.php?location=london&style=panel&design=astrolabe&color=dark&header=yes&key=YOUR_KEY"
        width="340" height="480" style="border:0" title="Prayer times"></iframe>

Change london to your city. The compact strip is 92 pixels high and stretches to the width of your page.

What visitors see

  • Fajr, sunrise, Dhuhr, Asr, Maghrib and Isha for today, from the timetable your city follows (London, for example, uses the Regent's Park Mosque timetable).
  • The next prayer and how long until it starts.
  • Your chosen language, including Arabic, Urdu, Bengali, Turkish, Indonesian, Malay, French and Somali, with prayer names and numbers in that language.

Already using the old widget?

Widgets embedded before keep working without a key. New sites need a free key from docs.globalquran.com; without it the widget does not show.

More for your site

Keep reading