How to Install Outbrain’s Widget on WordPress CMS

Need some help with setting up your shiny widget through a WordPress CMS?

Follow these steps to see your widget live in no time!

Step 1

Log into your WordPress website.

Log into the webpage with administrator access- You can do this by appending /wp-admin/ to the end of your WordPress site’s URL.

Step 2

In the WordPress dashboard, navigate to the “appearance” tab. 

Hover over the appearance tab, and navigate into the “editor” tab.

wordpress welcome screen

Step 3

Within the appearance tab, look for the file called Single Post (single.php) and click on it.

The file should be located on the list on the right-hand side of the tab

edit themes

Step 4

Now that you’re viewing the post content code, we need to replace the post’s code with the JavaScript that calls the Outbrain widget.

If the code is placed inside a PHP tag, it should be formatted as follows:

echo(‘<div class=”OUTBRAIN” datawidgetid=”AR_2″ dataobtemplate=”outbrain”
></div>’);

echo(‘<script type=”text/javascript”
src=”//widgets.outbrain.com/outbrain.js”></script>’);

If it’s outside the PHP tag you can paste it as is: 

Click on the “Update File” icon. This should make the widget active on the page.

<div class=”OUTBRAIN” datawidgetid=”AR_2″ dataobtemplate=”outbrain”
></div>
<script type=”text/javascript”
src=”//widgets.outbrain.com/outbrain.js”></script>

Click on the “Update File” icon. This should make the widget active on the page.

Step 5

That’s it! You are ready to go!

Be sure to check on your site to be sure the Outbrain widget is live on your page!

 

Need Further Help?

Speak to an Outbrain expert

Contact Us