Adsense code for in-feed Ads
-
Hi,
I am trying to insert an in-feed adsense ad into my main content news list.
I am having trouble getting it to show up correctly. Below is where I am trying to insert the code for adsense. Can someone help me install the code?<?php /* Template for displaying posts page and category archives */ if (have_posts()) : $counter = 1; $max_posts = $wp_query->post_count; while (have_posts()) : the_post(); if ($counter == 1) : get_template_part('content', 'lead'); ?> <hr class="mh-separator"><?php else : get_template_part('content'); endif; $counter++; endwhile; else : get_template_part('content', 'none'); endif; mh_newsdesk_lite_pagination(); ?>
Here is my adsense code:
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-format=”fluid”
data-ad-layout=”image-side”
data-ad-layout-key=”-fk+5y+4w-f5+97″
data-ad-client=”ca-pub-5823980480550167″
data-ad-slot=”3785554547″>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Adsense code for in-feed Ads’ is closed to new replies.