Native Ad Codes into sidebar and after post content

Posted in: Newsmag
Post count: 12

Hey guys,

So I formed a recent partnership with Outbrain (a native advertisement company), and they provided me with a couple of codes that I could add to my site. These codes would add native advertisements to either my sidebar or after my post content.

However, I don’t know how to add it, and where to place the code. The initial code is javascript, which I was told to add in my header, and I did through a WordPress plugin. The other two however are div class codes. These are the codes that I was told to add for sidebar and below content ads.

And lastly, a question for a different issue – I asked a little while ago for how I can add a header ad above or below my site’s full header logo. My question was answered, but I didn’t want to go through the hassle and potentially ruin my site’s theme. Now I’m willing to do it. In the response I was told to edit the code separately, but what software do I use on Mac OS?

Any help is much appreciated.

Post count: 6535

Hi

You can try to add the div classes in theme’s ad-spots like it is indicated in our documentation: https://forum.tagdiv.com/newsmag-using-other-ads/ Note that you may need some css adjustments in order to have the ads displayed fine on pages.

You can use any text editor which works on Mac OS to edit theme’s files, you don’t need a very special software. Before making any changes in theme’s code make sure you do a full backup as a security measure: https://codex.wordpress.org/WordPress_Backups

Thanks!

Post count: 12

Hey Andrei,

So, Here are all the codes they sent me, can you please tell me where to place them? I tried doing what you suggested, but it doesn’t show. So, I’m guessing that I need to add some custom css.

//script tag, place in header
<script type=”text/javascript” async=”async” src=”http://widgets.outbrain.com/outbrain.js”></script&gt;

// footer unit, place below content
<div class=”OUTBRAIN” data-widget-id= “TF_1” data-src = “” data-ob-template=”shanaplandebate” ></div>

// sidebar unit, place in right sidebar
<div class=”OUTBRAIN” data-widget-id= “TS_1” data-src = “” data-ob-template=”shanaplandebate” ></div>

Post count: 6535

Hi

The above code seems to make a request to an external script which generate the ad. The theme will renter the code but cannot control the content delivered by your ad-provider.
The code should look like this in theme panel:

Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newsmag’ is closed to new topics and replies.