PHP PollUser Manual Visit PHP Poll →
Embed & share

Add a poll to WordPress and other CMS

Add a PHPPoll poll to WordPress, Wix, Joomla, Shopify or any CMS using a Custom HTML block and the JavaScript embed code. Step-by-step with tips for each platform.

You do not need a plugin to use PHPPoll with a content management system. Every CMS that accepts HTML can display a poll through the JavaScript embed code. Your poll data stays on your own server.

WordPress

  1. In PHPPoll open Embed & share, select the poll and copy the JavaScript embed code.
  2. In WordPress edit the post or page. Click + and add a Custom HTML block.
  3. Paste the code into the block and click Preview. The poll appears.
  4. Publish or update the page.

To show a poll in the sidebar or footer, add a Custom HTML widget under Appearance → Widgets and paste the same code.

Some security plugins or user roles strip <script> tags. In that case use the iframe code from the same page. See Embed a poll with an iframe.

Other platforms

PlatformWhere to paste the code
JoomlaA Custom HTML module, or the editor in "Code" / source mode.
DrupalA block or text format that allows full HTML.
WixThe Embed code element (HTML). If scripts are not accepted, use the iframe code.
ShopifyA Custom Liquid section or the HTML view of a page.
Squarespace, WebflowA Code / Embed block.
Static HTMLDirectly into the page source.

Match the poll to your theme

  • Choose a theme and accent color on the Embed & share page, so the code matches your site. See Share and embed polls.
  • For dark websites select the Dark theme.

Tips

  • Place the poll below the introduction of the article, where readers are engaged.
  • Embed the same poll in several posts to collect more votes. The statistics show the sources. See Poll statistics and individual votes.
  • For the highest speed on PHP-based sites you can use the PHP include instead.

Last updated