Embedding Campaigns on your WordPress site

Woobox offers a free WordPress plugin and a WP short-code to make embedding campaigns as easy as possible!

Just visit the Embed on Website section of your campaign’s Overview page and click the “WordPress’ button in the Embed Target area.

Woobox provides a quick and easy method for embedding campaigns within an external website, which you can find in the Overview tab where it says Embed on Website.   For previous version campaigns, go to the Setup -> Embed section of your campaign's dashboard (you can simply copy/paste the code given there into your website).   Additionally, for reference, we've explained the process here. Using the block of HTML/JavaScript below, you can embed this campaign in any webpage, allowing users to interact with every aspect of the promotion from inside an element of your choosing. Follow the instructions to embed this campaign on a webpage of your choosing: Step 1) Insert the embed code for our JavaScript SDK in the HTML of your webpage, preferably after the opening <body> tag: <div id='woobox-root'></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//woobox.com/js/plugins/woo.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'woobox-sdk'));</script> Step 2) Then place the embed element in the HTML of your webpage wherever you would like the campaign to appear: <div class='woobox-offer' data-offer='123abc'></div> NOTE: The data-offer attribute is the unique offer URL shard, the last piece of the promotion's shareable URL. PRO TIP:To center the embedded promotion on your site add style="margin:auto;" to the code in Step 2.   You're all set! The embed element resizes automatically to fill the width of whatever its containing element is (up to a max width of 810px), and the height will scale dynamically to fit the content of the campaign.
Embed target - WordPress

Click the link to download and install the free plugin to your site.

Link to embed WordPress plugin

Once the plugin is installed, you can copy the short-code at the bottom of the Embed section and paste it directly into the content editor of the post or page where you would like the campaign to appear.

WordPress short code

If this method is not working on your WP site, check to see if you have any other plugins that may be conflicting with the Woobox plugin. Our plugin and short-code will work with most themes.

Updated on July 15, 2021

Was this article helpful?

Related Articles