My Problem Regarding Blogspot Theme - I Want To Place Ad After Blog Title


#1

This is my first post here, and my concern is very clear…

I want to place Google Adsense ads after my blog title, which is easy because I just need to place the code in the theme as per the online tutorials. It is working for me…

But, the problem is when I place the ads, it is showing on the home page also… So, I just want to create code without changing my current blog theme. I want my blog post image and description to appear automatically in the home page just like other 10 post and ads should be hide on home page, but when user open the post, they will be getting first title, ads, desc, and blog post image…

Kindly check and do the needful and provide me the codes with the simple tutorial which I can follow and apply the changes according to me requirement. Thanks :slight_smile:


#2

Just inclose it inside the following conditional tags:

<b:if cond='data:blog.pageType=="index"'>
//Your Adsense Ad Code
</b:if>

#3

Ad problem will be solved, but what about the automatic image and description of 10 post on the home page. I want to know how to implement that type of coding…


#4

@Shivansh please help me…same problem


#5

Please share your blog’s link so I can check what is causing the problem.


#14

@Hassan My website InfoBise.com


#15

Place the ad code in the ad widget you might find near the header in layout section.

If you cannot find it in layout, then go to Theme > Edit HTML

Search for id=‘headerwidgetnbt’> (Use CTRL+F) for search

And place the ad code after it.


#16

I want to add adsense code below post title


#17

You said same problem so i thought you were asking about how to place ad after blog title. I checked your blog and I noticed that you already have placed ads below post title but you want to show ads only on post and not on homepage.

If this is what you want then do as follows:

<b:if cond='data:blog.pageType == "item"'>
  Ad code
</b:if>

Replace Ad code with your adsense code and then place it below post title.


#18

@Hassan now full posts are showing on the homepage …


#19

You need to do this for all the ads you have added in your post.


#20

The ads you have added below post are only showing when you open the post pages. So they are alright. But you have added about 5 more ads in a post. You need to do this for these ads as well.


#21

Thank you …but full posts are showing on the homepage …i want to show only post summary on the page …


#22

Did it happen after you added the code? Because I checked you template’s source and the readmore script is intact.


#23

I am not seeing full posts on your blog. But the ads are still showing. So search for this code <script async='async' src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>

And you will find the full code as follows:

&lt;script async='async' src='[//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js](https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js)'&gt;&lt;/script&gt;
&lt;ins class='adsbygoogle' data-ad-client='ca-pub-4995746537784709' data-ad-format='link' data-ad-slot='7803096883' data-full-width-responsive='true' style='display:block'&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle []).push({});
&lt;/script&gt;

Replace it with

<b:if cond=‘data:blog.pageType == “item”’> <script async=‘async’ src=’//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js’></script> <ins class=‘adsbygoogle’ data-ad-client=‘ca-pub-4995746537784709’ data-ad-format=‘link’ data-ad-slot=‘7803096883’ data-full-width-responsive=‘true’ style=‘display:block’></ins> <script> (adsbygoogle = window.adsbygoogle []).push({}); </script> </b:if>


#24

… i remove the code thats why full posts are not showing


#25

Kindly check your inbox. I have explained everything. Hope it helps.