# How to add AdSense ads over posts for Dazzling theme

**URL:** <https://colorlibsupport.com/t/how-to-add-adsense-ads-over-posts-for-dazzling-theme/6865>\
**Category:** Dazzling\
**Created:** [February 4, 2015, 11:28am UTC](https://colorlibsupport.com/t/how-to-add-adsense-ads-over-posts-for-dazzling-theme/6865 "2015-02-04T11:28:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![v1ppers0nn](https://colorlibsupport.com/user_avatar/colorlibsupport.com/v1ppers0nn/32/2666_2.png) [@v1ppers0nn](https://colorlibsupport.com/u/v1ppers0nn)\
**Post date:** [February 4, 2015, 11:28am UTC](https://colorlibsupport.com/t/how-to-add-adsense-ads-over-posts-for-dazzling-theme/6865/1 "2015-02-04T11:28:26Z")

</div>

Hi,  
i try to add AdSense code over \<main id=“main” class=“site-main” role=“main”\> but the ads not show. Can anyone help me?

---

<div class="post-metadata">

**Author:** ![aigars-silkalns](https://colorlibsupport.com/user_avatar/colorlibsupport.com/aigars-silkalns/32/13469_2.png) [@aigars-silkalns](https://colorlibsupport.com/u/aigars-silkalns)\
**Post date:** [February 9, 2015, 4:38pm UTC](https://colorlibsupport.com/t/how-to-add-adsense-ads-over-posts-for-dazzling-theme/6865/2 "2015-02-09T16:38:49Z")

</div>

Those ads should appear but only on those template files that you edited. If you edited, `single.php` then ads should be displayed on Single Posts. If on `page.php` then on Single Page and so on.

A simpler alternative for AdSense banner management is to use official Google AdSense plugin that [you can download here](https://wordpress.org/plugins/google-publisher/).

---

<div class="post-metadata">

**Author:** ![soshailakash](https://colorlibsupport.com/user_avatar/colorlibsupport.com/soshailakash/32/1284_2.png) [@soshailakash](https://colorlibsupport.com/u/soshailakash)\
**Post date:** [August 18, 2016, 10:34am UTC](https://colorlibsupport.com/t/how-to-add-adsense-ads-over-posts-for-dazzling-theme/6865/3 "2016-08-18T10:34:33Z")

</div>

Hi @Aigars I am trying to add Adsense between posts (Specifically after every 3 posts on Category pages) I am using the following code (In Main Index php file)

\<?php $count = 3; ?\> Above \<?php while (have\_posts()) : the\_post(); ?\>

The following code Above \<?php endwhile; ?\>

\<?php if ($count == 3) : ?\>  
AdSense Code 1  
\<?php endif; $count++; ?\>

But the Ads appear right after the first post, i want them to appear after 3 posts.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![movin](https://colorlibsupport.com/user_avatar/colorlibsupport.com/movin/32/10922_2.png) [@movin](https://colorlibsupport.com/u/movin)\
**Post date:** [September 2, 2016, 2:50pm UTC](https://colorlibsupport.com/t/how-to-add-adsense-ads-over-posts-for-dazzling-theme/6865/4 "2016-09-02T14:50:41Z")

</div>

@soshailakash This is old topic and to help us keep support thread separates could you please create your own thread for your question here [https://colorlibsupport.com/c/dazzling/](https://colorlibsupport.com/c/dazzling/) instead of replying on others thread as it makes the thread messy and hard to read.

If you want to you can also add reference of this thread in your newly created thread.

We would be more than happy to help you on your new thread.
