Tagged: x
-
AuthorPosts
-
September 2, 2016 at 6:38 am #1158345
srinivasmishraParticipantHi There,
Thanks to x theme, now my blog is live. I am looking for guidelines for the following ads scripts:
1. Page level ads ( Mobile):
Place the code below inside your <head> tag once.
<script type=’text/javascript’>
(function(w) {
if(navigator.userAgent.match(/iPhone|iPod|iPad|Android/i)==null)return;
var d=document,h=d.getElementsByTagName(‘head’)[0],s=d.createElement(‘style’),j=d.createElement(‘script’),k=d.createElement(‘script’);
s.setAttribute(‘rel’,’mw-page-block’);s.innerHTML=’body > * {display:none !important}’;
j.setAttribute(‘src’,’//cdn.adsoptimal.com/advertisement/settings/39325.js’);
k.setAttribute(‘src’,’//cdn.adsoptimal.com/advertisement/dispatcher.js’);
j.onerror=k.onerror=function(){h.removeChild(s);h.removeChild(j);h.removeChild(k);};
h.appendChild(s);h.appendChild(j);h.appendChild(k);
})(window);
</script>2. Inline ads for Desktop Mobile eg:
Header: Place this code into the HEAD element of the web page once
<script type=’text/javascript’>
(function(w) {
var d=document,h=d.getElementsByTagName(‘head’)[0],j=d.createElement(‘script’),k=d.createElement(‘script’);
j.setAttribute(‘src’,’//cdn.adsoptimal.com/advertisement/settings/39325.js’);
k.setAttribute(‘src’,’//cdn.adsoptimal.com/advertisement/manual.js’);
h.appendChild(j); h.appendChild(k);
})(window);
</script>Document Body: Place this code where the unit should be displayed inside page body. Add up to 3 Desktop ads per page.
<div class=”adsoptimal-slot” style=”width: 728px; height: 90px;”></div>
Guildlines are as follows:
Number of Ad Placements
Device Maximum Allowance
Desktop 5 units
Tablet 3 units per viewable area
Mobile Only one unit per viewable areai want to show these inline ads in three way:
1. after every 5 post in mansory style for archieve and blog home page
2. below the contents of every post 1 banner
3. side bar widgetsAny help will be appreciated.
Thanks
September 2, 2016 at 11:32 am #1158641
JadeModeratorHi there,
#1 and #2 Please add this code in the functions.php of your child theme:
function my_custom_head_output() { ?> <!-- Add the Javascript codes here --> <?php } add_action( 'wp_head', 'my_custom_head_output', 99999 );#3 Add a Raw Content element in the page and place the code in it
<div class="adsoptimal-slot" style="width: 728px; height: 90px;"></div>Let us know how it goes.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1158345 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
