Add a Campaign Grid to Your Website

Show a campaign group's campaigns as cards on your website, each with its own Donate button.

A Grid shows several campaigns side by side as cards, each with a photo, a name and a Donate button. It suits a page that lists your current appeals, such as your Ramadan or Qurbani campaigns. Each card opens the checkout for its own campaign.

A Grid showing three campaigns as cards, each with its own Donate button
A Grid showing three campaigns as cards, each with its own Donate button

The grid shows the campaigns in a campaign group, so create the group first. Then add the grid in four steps. The embed code in step 3 only needs to go on your site once, so skip that part if it's already there.

1

Create the grid

In your dashboard, go to Sites → Elements and click New element. Give it a name your team will recognize, choose Grid as the type and click Create element.

2

Choose the campaigns and how they look

On the Behavior tab, choose the campaign group under Content. The grid shows every campaign in that group. Under Opens in, choose Checkout Modal to open checkout over your page, or Hosted Page to send donors to the campaign's hosted page.

On the Style tab, set the cards' color, text color, corners, shadow and border, then the buttons inside them. The preview shows the grid as it will look on your site.

The grid fits the space you give it, with up to four cards in a row. To change which campaigns appear, edit the campaign group. The grid follows it.

3

Add the embed code and the grid's tag to your site

Your site needs two pieces of code:

  • The embed code, once, in the header of every page. Copy it from Settings → Website → Embed code. If you've added Nizam to your site before, it's already there.
  • The grid's tag, on the page where the grid should appear. Copy it from under the grid's name in Sites → Elements. It looks like <nizam-element id="el_xxxxxxxx"></nizam-element>.

Choose how your website is built:

Embed code: install a header code plugin such as WPCode, open its Header & Footer settings, paste the embed code into the Header box and click Save Changes.

Grid tag: edit the page, add a Custom HTML block where the grid should go, paste the tag and click Update.

Save and publish your site. For more detail on the embed code, see Install the embed code.

4

Check it works

Open the page in a private or incognito window. The grid appears where you placed it, with a card for each campaign in the group. Click a card's Donate button, and the checkout opens for that campaign.

Changing or Removing the Grid, copy link to this section

Edit the grid in Sites → Elements at any time, and your site updates on its own. To take the grid off a page, delete its tag from the page.