documentation

Embed a quiz to your wordpress website

Embed a quiz to your wordpress website

Learn how to embed a quiz on your WordPress site using Plug And Quiz. Follow this guide to use an iframe or the WordPress plugin and easily engage your visitors.

Prerequisites

Before starting, create your quiz with Plug And Quiz. Also, ensure you have a WordPress site with admin rights.

Step 1: Authorize your WordPress site

Add your WordPress site to the list of authorized sites in your Plug And Quiz account:

  1. Go to the "Domain" section.
  2. Click on "+" and then "Add a website".
  3. Enter the URL of your WordPress site.
  4. Optional: Add specific pages or remove them if necessary.

Step 2: Choose your integration method

Two options are available to embed your quiz:

  1. Iframe: Insert an iframe into your WordPress page.
  2. WordPress Plugin: Use the Plug And Quiz plugin for quick integration.
  3. Script in the header: Add a script to your WordPress theme's header.

Step 3: Integration

Option 1: Embed via iframe

  1. Copy the URL of your quiz from the "Share" tab in the "Integration" section of your account.
  2. Paste this URL into the editor of your WordPress page.

Option 2: Integration via the WordPress plugin

  1. Download the Plug And Quiz plugin from here or via the WordPress directory.
  2. Install and activate the plugin in the "Plugins" section of your WordPress dashboard.
  3. Go to "Plug And Quiz" in your dashboard.
  4. Enter your domainId (available in the "Domain" or "Integration" section of your account).
  5. Click "Save".
  6. Embed your quiz on your WordPress pages via the "Integration" tab.
  7. Customize the quiz appearance, such as the position of the open button.

Option 3: Script in the header

  1. Copy the following script and paste it into the header section of your WordPress theme:
<script id="f22f8c3b-4370-4fc8-b1da-f266d0485cc7" src="https://cdn.plug-and-quiz.com/v1.0.0/embed.js" data-domainId="your-domain-id" data-position="bottom-right" defer></script>
  1. Replace your-domain-id with the domain ID from your Plug And Quiz account.
  2. Adjust the data-position attribute to change the button's position (e.g., top-left, top-right, bottom-left, bottom-right).

Test and customize your quiz

Test your quiz to ensure it works correctly. Customize its design in the "Design" section of your Plug And Quiz account.

With Plug And Quiz, embedding a quiz on WordPress has never been easier. Engage your visitors today!

Plug and Quiz