GlobalQuranBLOG Read the Quran

Developers ·

Quran WordPress plugin: how to add the Quran to your website

The free Global Quran plugin puts the Quran on your WordPress site with the same reader as globalquran.com. Add the whole Quran to a page, or a single verse to a post, a sidebar or a footer, as a block, a shortcode or a widget. This page shows how to install it, how to use it and what it looks like.

A Global Quran verse card on a WordPress site: Surah Al-Ikhlas in the mushaf script with tajweed colours, its English translation, a play button and a golden frame

Embed the Quran today Get a free API key

Price: free (GPL licence). Version: 3.0.0.

Needs: WordPress 6.0 or later, PHP 7.4 or later and a free Global Quran API key.

What you can add to your site

  • The Quran reader: the whole Quran with translations, audio and tajweed, inside a frame so your theme cannot break it.
  • Verse cards: one ayah, a range or a short surah (up to 50 ayahs), written into your page as real HTML.
  • A verse card widget for your sidebar or footer.

How to install the Quran plugin

1. Install and activate

When the plugin is available on WordPress.org: in your WordPress admin, go to Plugins, then Add Plugin. Search for Global Quran, click Install Now, then Activate.

The WordPress Plugins screen with Global Quran version 3.0.0 installed and its Activate link

2. Add your free API key

After activating, open Global Quran in the admin menu. Create a free key at docs.globalquran.com, restrict it to your own domain, paste it into the box and click Verify & continue. The other settings tabs then unlock.

The Global Quran welcome screen in WordPress with three steps: get a free key, paste it, start

Until a key is saved, visitors see nothing broken; only site administrators see a short note.

3. Create your Quran page

Make a new page, add the Global Quran Reader block or type [globalquran], and publish. You can also use the Create a Quran page button on the Visitors tab, which makes the page for you.

The Quran reader on a WordPress page, showing Surah Al-Fatihah with transliteration, English translation and tajweed colours

How to use it

In the block editor

Click the + button and search for “quran”. There are two blocks: Global Quran Reader and Global Quran Verse. For a verse, choose the surah, the first and last ayah, the translations and the look in the sidebar; the card is shown in the editor as you work.

The WordPress block editor with the two Global Quran blocks in the search and a verse card for Surah Al-Ikhlas with its settings

With shortcodes

Shortcodes work in posts, pages and most page builders:

[globalquran]
[globalquran surah="36" translation="en.sahih,ur.jalandhry" theme="night" height="600"]

[globalquran_verse ref="2:255"]
[globalquran_verse ref="112:1-4" style="night" tajweed="yes"]
[globalquran_verse surah="36" from="1" to="5" translation="en.sahih,fr.hamidullah" listen="no"]

As a widget

Under Appearance, then Widgets (or in the site editor), add Global Quran Verse card to a sidebar or footer and enter a reference such as 2:255.

Verse cards

A card shows the Arabic, the translations you choose, the reference, a Listen button that plays the recitation and a Read in full link. By default it uses the mushaf font with tajweed colours; Amiri Quran, KFC Naskh and Me Quran are the simpler choices. Pick the Day or Night look with the golden frame, or Match my theme to take your theme’s text colour and font.

Ayat al-Kursi as a verse card in a WordPress post, with tajweed colours, English translation, play button and Read in full link

Set the defaults once on the Verse card tab, with a live preview, and copy the shortcode from there.

Verse card settings: verse, translation, Arabic font, tajweed colours, look, size and alignment beside a live preview

Reader settings

On the Reader tab, choose where the reader opens (or let it remember each visitor’s place), the translations, the Arabic text, the surah list, the audio player and the height. The Appearance tab sets a day, night or automatic theme and your accent colour. Visitors controls who sees the reader and whether it offers a sign-in for saved verses.

Reader settings in WordPress: opening place, translations, Arabic text, surah list, audio player and height

Shortcode options

Reader: [globalquran]

OptionWhat it sets
surah, ayahWhere the reader opens
translationTranslation ids, separated by commas, or none
themeday, night or auto
accentA hex colour
fontmushaf, amiri or me
sidebar, player, loginyes or no: surah list, audio player, sign-in prompt
heightHeight in pixels

Verse card: [globalquran_verse]

OptionWhat it sets
ref2:255, 112:1-4 or a surah number
surah, ayah, from, toThe same, written separately
translationTranslation ids, or none
styleday, night or match
fontmushaf, amiri, kfc or me
tajweedyes or no (not with Me Quran)
size, aligns, m or l; center or start
arabic, reference, listen, linkyes or no: what the card shows
reciterWho recites when Listen is pressed

Translation ids such as en.sahih or ur.jalandhry are listed at docs.globalquran.com. There are translations in many languages.

Questions

Is the Quran plugin free?

Yes. The plugin and the API key are both free.

Why does it need an API key?

The key is how the Quran text, translations and audio reach your site. Restrict it to your domain so nobody else can use it.

I used the old GlobalQuran plugin. What changes?

Version 3.0.0 is a rewrite that also fixes a security problem in the settings page of the earlier versions, so please update as soon as it is available. Add your key afterwards and your old {GlobalQuran} tags show the reader again. The old stylesheet address settings are gone.

What does the plugin connect to?

For verse cards your server fetches the text from the Global Quran API; the visitor’s browser loads the Arabic fonts, and the recitation when Listen is pressed. The full reader loads from globalquran.com in a frame, which receives your API key and your site’s name. See the privacy policy.

Can I add the Quran without WordPress?

Yes. Embed the Quran reader with two lines of HTML, build your own with the free Quran API, or add prayer times to your website.

Keep reading