Braxton DFP leaderboard ad
-
Hello,
I have created a child of the Braxton template and I can’t get the leaderboard ad to show up by pasting the javascript code into the ad space.
The template author says that I am to place some code into the header.php file. Here is what that file looks like:
> ID), 'medium-thumb' ); ?> > 'main-menu')); ?> ? get_option('mvp_slider_tags'), 'posts_per_page' => get_option('mvp_slider_num') )); while($recent->have_posts()) : $recent->the_post(); $do_not_duplicate[] = $post->ID; if (isset($do_not_duplicate)) { ?> ? ID, "mvp_video_embed", true)): ?> ?cat_name; ?>?ID, "mvp_featured_headline", true)): ?> ID, "mvp_featured_headline", true); ?>????? < > ? get_option('mvp_slider_cat_num'), 'cat' => $category_id )); while($cat_posts->have_posts()) : $cat_posts->the_post(); $do_not_duplicate[] = $post->ID; if (isset($do_not_duplicate)) { ?> ? ID, "mvp_video_embed", true)): ?> ?ID, "mvp_featured_headline", true)): ?> ID, "mvp_featured_headline", true); ?>????? < >
and then I will be able to add javascript code for my DFP ad unit to the temple leaderboard ad space and then it will work.
Here is the javascript code I generated from DFP for the ad unit I want to place above my logo:
head code:
<script type=’text/javascript’>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function() {
var gads = document.createElement(‘script’);
gads.async = true;
gads.type = ‘text/javascript’;
var useSSL = ‘https:’ == document.location.protocol;
gads.src = (useSSL ? ‘https:’ : ‘http:’) +
‘//www.googletagservices.com/tag/js/gpt.js’;
var node = document.getElementsByTagName(‘script’)[0];
node.parentNode.insertBefore(gads, node);
})();
</script><script type=’text/javascript’>
googletag.cmd.push(function() {
googletag.defineSlot(‘/9264261/AN_LeaderFlex_ROS’, [[970, 90], [728, 90], [970, 250]], ‘div-gpt-ad-1465829474714-0’).addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>body code:
<!– /9264261/AN_LeaderFlex_ROS –>
<div id=’div-gpt-ad-1465829474714-0′>
<script type=’text/javascript’>
googletag.cmd.push(function() { googletag.display(‘div-gpt-ad-1465829474714-0’); });
</script>
</div>Please help me understand how to get this to work!
Here is my url:
https://modernmag.wpengine.comThank you!
- The topic ‘Braxton DFP leaderboard ad’ is closed to new replies.