WordPress Blog Homepage Layout Post Ke Bich Me Adsense Ads Kaise Lagaye

0
17

Aapne aksar dekha hoga bahut se wordpress home page layout me 2nd, 3rd ya 4th post ke baad adsense ads show hote hai. Agar aap bhi WordPress user ho aur apne blog par aise hi advertisements display karne me interested ho to ye tutorial aapke liye hi hai. Yaha mai aapke sath without plugin wordpress blog homepage layout post ke bich me adsense add lagane ka trick share karuga

Mostly, bloggers apne wordpress blog par adsense ads add karne ke liye plugins install karte hai. Par agar bina plugin istemal kiye hi humara kaam ho jaye to isse behtar aur kya ho sakta hai.

WordPress Blog Homepage Layout Post Ke Bich Me Adsense Ads Kaise Lagaye

Apne previous post me maine aapko without plugin wordpress post titke ke niche adsense ads lagane ka trick bataya tha. Jise kaafi bloggers ne pasand kiya. I hope aaj ka post bhi aapke liye bahut useful sabit hoga.

Mai apne readers ko humesha extra plugins avoid karne ki suggestion deta hu. Isse site loading speed bhi fast rehti hai aur search engines ko bhi blog index karne me pareshani nahi hoti.

How to add Adsense ads in WordPress homepage layout after 1st post?

Step 1: Sabse pehle WordPress dashboard >> appearance >> editer me theme ka index.php file open kare.

Step 2: Ab is folder me niche likha code find kare.

<?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>

Step 3: Ab us line ke upar (before) ye niche likha code add kare.

<?php $count = 1; ?>

Step 4: Ab fir niche wala code search kare.

<?php endforeach; else: ?>

Step 5: Ab upar wale code se thik pehle/upar (before) niche likha code paste kare.

<?php if($count == 1):?>

paste your AdSense code here

<?php endif;?>

<?php $count++;?>

Paste your adsense code ki jagah, Apne Adsense ad code paste kare.

Jab jab ye sab finish kar loge to edited code code is tarah se dikhega.

<?php if($count == 1):?>


<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- AdSense code -->
<ins class="adsbygoogle"
 style="display:inline-block;width:300px;height:200px"
 data-ad-client="ca-pub-xxxxxxxxxxxxxxx"
 data-ad-slot="xxxxxxxxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

<?php endif;?>

<?php $count++;?>

Yaha aap Adsense ad ki height & width (highlighted in green color) ko apne jarurat ke anusar set kar sakte ho.

Step 6: Finally, update file par click karke settings save kare.

Ab aap apne blog homepage par visit karke dekh sakte sakte ho ki 1st post ke baad ads thik se display ho rahi hai ya nahi.

Note: Upar step 5 code me  me 1 ki jagah aap 2nd, 3rd ya 4th post ke baad Adsense ad display karne liye 2, 3 ya 4 (respectively) likh kar sakte ho.

Bonus tip: WordPress blog par achieve page nevigation layout par adsense lagane me liye upar 1 se 5 steps follow kare. Isse aapke achieve pages par bhi same ads show hongi.

I hope is post ko padh kar aapko WordPress homepage layout par post ke bich me Adsense ads lagane me koi dikkat nahi hogi. Aapka koi sawal ya suggestion ho to comment box me puche. Agar aapko ye article acha laga to ise social media sites par dusre logo ke sath jarur share kare.

LEAVE A REPLY

Please enter your comment!
Please enter your name here