WordPress plugin
Install the Ardent Africa WordPress plugin and embed live campaigns, petitions, events, causes, listings, and supporter badges.
The Ardent Africa plugin puts live content from Ardent Africa on your WordPress site — as native, server-rendered cards (good for SEO), not just iframes. It is read-only and safe: Donate, Sign, and Get-tickets buttons link visitors to ardent.africa, where the secure on-platform flow runs. No payments happen on your site, your API key never reaches the browser, and only public information is shown.
Requirements
- WordPress 6.1+ and PHP 7.4+.
- A free Ardent account, to create an API key (see below).
1. Install
- From WordPress.org (recommended): in your dashboard go to Plugins → Add New, search for "Ardent Africa", then Install and Activate — or visit the listing at wordpress.org/plugins/ardent-africa.
- Manual: download the plugin zip, then Plugins → Add New → Upload Plugin, choose the zip, Install, and Activate.
2. Add your API key
The plugin needs an API key before it shows anything.
- Sign in at ardent.africa and open Dashboard → Developer API
(
https://ardent.africa/dashboard/developer). - Accept the API terms, name a key (e.g. "My WordPress site"), and Create. Copy the
ardent_pk_…secret — it's shown once. - In WordPress, go to Settings → Ardent, paste the key, and Save. Set a default theme (light/dark) and cache duration here too (see authentication).
Until a key is saved, an admin notice links you here and blocks render an "add your key" prompt (visitors see nothing).
3. Add content
Three ways, pick whichever suits the page:
- Blocks — in the editor click +, search "Ardent", and insert a block. Fill in the slug/username in the block's sidebar; a live preview renders in the editor.
- Shortcodes — paste an
[ardent_*]shortcode (below) into any post, page, or widget. Great for classic editor and page builders. - Paste a link — paste an
ardent.africalink straight into the block editor; the plugin registers Ardent as an oEmbed provider, so it becomes a card automatically.
Blocks & shortcodes
Every block has a matching shortcode. All accept an optional theme (light or dark,
default = your Settings → Ardent theme). Slugs/ids/usernames come from the item's ardent.africa URL.
| Content | Block | Shortcode | Where the id comes from |
|---|---|---|---|
| Campaign card | Ardent Campaign | [ardent_campaign slug="clean-water-for-tamale"] | ardent.africa/campaign/<slug> |
| Petition | Ardent Petition | [ardent_petition slug="pass-the-bill"] | ardent.africa/campaign/<slug> |
| Donation progress (compact) | Ardent Donation Progress | [ardent_donation_progress slug="clean-water-for-tamale"] | ardent.africa/campaign/<slug> |
| Causes grid | Ardent Causes | [ardent_causes limit="6" category="Education" country="GH"] | — (lists active causes) |
| Events list | Ardent Events | [ardent_events limit="5" category="Technology"] | — (lists upcoming events) |
| Marketplace grid | Ardent Marketplace | [ardent_marketplace limit="6" q="photography"] | — (lists listings) |
| Supporter impact badge | Ardent Impact Badge | [ardent_badge username="ama"] | ardent.africa/supporter/<username> |
Optional attributes:
- Campaign / Petition:
variant—standard(image card, default),overlay(image hero with the title over it), orcompact(no image). Both show the item's image when it has one. - Causes:
limit(1–12, default 6),columns(2/3/4, default auto),category,country(ISO code, e.g.GH). - Events:
limit(1–12, default 5),category. - Marketplace:
limit(1–12, default 6),columns(2/3/4),category(slug),q(search).
Examples:
[ardent_campaign slug="clean-water-for-tamale" variant="overlay"]
[ardent_petition slug="pass-the-bill" variant="compact"]
[ardent_causes limit="6" columns="3" category="Healthcare"]
[ardent_events limit="4"]
[ardent_badge username="ama"]Elementor
If you build pages with Elementor, all seven items are available as native widgets — no shortcodes needed.
- Edit a page with Elementor.
- In the widget panel, open the Ardent Africa category (or search "Ardent").
- Drag a widget — Ardent Campaign, Ardent Petition, Ardent Donation Progress, Ardent Causes, Ardent Events, Ardent Marketplace, or Ardent Impact Badge — onto the canvas.
- In the widget's Content controls, enter the slug/username (or the limit/category/search for the grids), choose a Style (Card / Overlay / Compact) for campaign and petition or Columns for the grids, and pick a theme. A live preview renders in the editor.
The widgets render the same cards as the blocks and shortcodes and obey the same API key and cache settings. Requires Elementor 3.5+.
Theming & caching
- Theme — light or dark, set globally in Settings → Ardent or per block/shortcode with
theme=. Cards inherit your theme's fonts. - Caching — responses are cached server-side (default 5 minutes; change it in Settings). New content can take up to that long to appear; lower the cache if you need it fresher.
Troubleshooting
- A block shows "add your key" — no API key is saved. Add one in Settings → Ardent.
- A card says "not available" — the slug/username is wrong, or the item isn't public (e.g. a draft campaign, an unpublished event, or a profile that isn't public).
- Causes grid is empty — there are no active causes matching your
category/country. - Changes aren't showing — wait for the cache window, or lower the cache duration.
Security & privacy
- The plugin is read-only. Donations, signatures, and ticket purchases happen on ardent.africa via its secure flow — never on your site.
- Your API key is stored on your server and used server-side; it is never exposed to visitors.
- Only public data is fetched — no donor, signer, or private information.
- The optional iframe/script embeds are sandboxed (no
allow-same-origin).
Updating & removing
Update like any plugin (Plugins screen, or WordPress.org auto-updates). Deactivating stops all embeds; deleting also removes the plugin's settings and cached data.
Last updated: 28 June 2026
