Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,289 members, 7,807,979 topics. Date: Thursday, 25 April 2024 at 01:01 AM

How To Make Adsense Code Visible In Middle Of A Blogpost - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / How To Make Adsense Code Visible In Middle Of A Blogpost (447 Views)

Hire Blogpost Writer / How Do I Add The Google Adsense Code To My Website? / Content Blogpost And Email Writer Needed (2) (3) (4)

(1) (Reply)

How To Make Adsense Code Visible In Middle Of A Blogpost by beloxxi(m): 1:09pm On Jun 07, 2017
Hello all, do you know that placing adsense code in the middle of your blogger's blog post can potentially increase your earning revenue by 12% or more. And in achieving increased traffic continually raises the percentage on monthly bases.

How To Get Started

==> BACK UP your blog template. Very Important!
==> Generate your Adsense ad code from www.google.com/adsense
==> Parse the Adsense ad code at www.freehtmlparser..com (paste and click "Encode"wink
==> Login to your Blogger dashboard and back up your template ( Very Important! )
==> Go to "Template" > "Edit HTML"

==> Use CTRL F to search your HTML for the JQuery script below:

<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js' type='text/javascript'/>

If it exists, move on to the next step. If not, copy the script above and paste directly above </body> in your blog's html

==> Use CTRL F to find </body> again and directly above it, paste the code highlighted below:


<b:if cond='data:blog.pageType == &quot;item&quot;'>
<script>
$AdCode = $("#AdCode"wink.html();
$("#PostBody br:lt(1)"wink.replaceWith($AdCode);
$("#AdCode"wink.remove();
</script>
</b:if>

==> Save the Template

==> Go back to "Template" > Edit HTML. Use CTRL F to find <data:post.body/> . Replace it with the code below:

<div id="PostBody">
<data:post.body/>
</div>


<div id="AdCode">
<div style='margin:5px 0;text-align:center;clear:both;'>
<!-- Paste PARSED Ad Unit Code Here -->
</div>
</div>

==> Save the template

NB: Your template might have 2 or more <data:post.body/> codes. You have to identify correct one by using "try and error" trick. The 2nd or 3rd instance works in most templates though.

==> Go to "New Post" > "Options". Ensure you select "Press Enter for line breaks".




That's all.

To make it appear on mobile view, find <b:includable id='mobile-post' var='post'> in your HTML and replace the <data:post.body/> under the line as explained above.

I hope it works if it doesn't work hit me up 7 steps to make adsense appear in the center of a blog post

1 Like

(1) (Reply)

I Need A Joomla Expert / Wow...i Am Paid To Just Shorten Urls, You Too Can / Build Your Career At Cache.team

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.