Skip to main content

Wordpress

Do you want to add the Video Donut JavaScript code to your Wordpress site? Follow these steps to easily add the Video Donut code to Wordpress. You might have to repeat these steps if you update your theme.

  1. In the Wordpress admin Dashboard sidebar, hover over Appearance and click Theme Editor.
  2. Click I understand
  3. Under Theme Files on the right, click header.php
  4. Right below the opening body tag (<body>), paste the following code:
<script>
!(function (w, d, s, o, f, js, fjs) {
w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
js = d.createElement(s); js.id = o; js.src = f; js.async = 1;
fjs = d.getElementsByTagName(s)[0]; fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', 'videodonut', 'https://js.videodonut.com/widget.js'));
videodonut('init', 'YOUR-VIDEO-ID');
</script>
</script>
  1. Click Update File.

You can also use a plugin to do this. This will ensure that your video-donut will work even if you update your site.#

  1. Add plugin Code Snippets to your Wordpress site.
  2. Once you've added it, hover over Snippets and click Add New.
  3. Enter Video Donut as your title, and paste the following under Code.
!(function (w, d, s, o, f, js, fjs) {
w[o] = w[o] || function () { (w[o].q = w[o].q || []).push(arguments) };
js = d.createElement(s); js.id = o; js.src = f; js.async = 1;
fjs = d.getElementsByTagName(s)[0]; fjs.parentNode.insertBefore(js, fjs);
}(window, document, 'script', 'videodonut', 'https://js.videodonut.com/widget.js'));
videodonut('init', 'YOUR-VIDEO-ID');
</script>
  1. You can include a description if you like, then, under Tags, enter javascript.
  2. Click Save Changes and Activate and you're done!

Ready to Grow Your Business?Start using Video Donut today.

Add a stories-style video to your website to boost engagement and conversions.

Sign up for Free