WordPress Blog Homepage Layout Post Ke Bich Me Ads Kaise Lagaye

WordPress blog me AdSense ads, affiliate market ad, clickbank and other kisi bhi advertisement company ke ads lagane ke liye aap plugin ka istemal kar sakte ho. But agar aap apne blog ke homepage par layout posts, first post, second post, third post ya fir kitni bhi post ke bad ads lagana chahate ho to aapko iske liye plugin ki jarurat nahi hai. In this post, mai aapko aysi tips bta raha hu jisse aap apne WordPress blog ke homepage par post ke bich me AdSense ads laga sakte ho without plugin.

add AdSense ad code to WordPress homepage

WordPress blog par bina plugin ke ads lagane ke bare me internet par is type ke question search kiye jate hai.

  • WordPress Me First Post Ke Bad Adsense Ads Kaise Add Kare?
  • WordPress Blog Ke HomePage Par Without Plugin Ads Kaise Lagate hai?
  • How to Add Advertisement After First post In WordPress Blog?
  • Add Adsense Ads in Middle Post?
  • Insert Adsense Code After First, Second and other Post?
  • How to Add Adsense Ads In WordPress Front Page?
  • WordPress Blog Me Adsense Ke Ads Kaise Lagate Hai?

Agar aap bhi inme se kisi sawal ka solution janna chahate ho to aap bilkul sahi post padh rahe ho. Is post me mai aapko ek choti si trick bta raha hu jisse aap aasan ise apne WordPress blog ke frontpage par AdSense ads show kar sakte ho. Follow step.

How to Add Adsense Ad in WordPress Homepage After First Post

  1. Go to WordPress dashboard >> appearance >> editer and open your index.php file.
  2. Now, is folder me is tarah ka ek code hoga.
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
  3. Ab in lines ke upar (before) ye code add kare.
    <?php $count = 1; ?>
  4. Ab ek bar bar fir ye code search kare.
    <?php endforeach; else: ?>
  5. Or is code se pahle (before) ye code paste kare.
    <?php if($count == 1):?>
    paste your AdSense code here
    <?php endif;?>
    <?php $count++;?>
  6. Ab isme "paste your AdSense code here" ki jagah apna AdSense code add kare. Adsense ad code add karne ke bad code kuch is type ka hoga.
    <?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:250px"
     data-ad-client="ca-pub-xxxxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxx"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    <?php endif;?>
    <?php $count++;?>
  7. Finally, Update file par click kare or setting save kare.

Now, ab ek bar apne blog ko open karke dekhe. Blog ki first post ke bad homepage par ads show ho raha hoga. Aap chaho to <?php if($count == 1):?> code me 1 ki jagah aap 2, 3, 4, 5 ya jitni aap chaho utni post ke bad AdSense ads show kar sakte ho.

Same isi tarah aap blog ke archive.php folder me bhi ye code add kare taki blog ke page navigation archives par bhi ads show ho.

I hope aapko ye trick pasand aayegi. Agar ha to aap ek bar apna 30 second ka time de kar is post ko social media par share jarur kare.

Avatar for Jumedeen Khan

मैं इस ब्लॉग का संस्थापक और एक पेशेवर ब्लॉगर हूं। यहाँ पर मैं नियमित रूप से अपने पाठकों के लिए उपयोगी और मददगार जानकारी शेयर करता हूं। ❤️

Comments ( 38 )

  1. भाई हमारा पोस्ट शेयर करने पर ऐसा दिखता है। इस प्राब्लम को कैसे हल करू। example.com/post-name-%E0%A4%95%E0%A5%8D%E0%A4%AF%E0%

    Reply
    • permalink mein hindi workd hone par link aesa hota hai.

      Reply
  2. bahut helpfull post hai bro

    Reply
  3. Sir mujhe aap se thodi help chahiye aap pls meri help kar dijiye ga.
    sir mera wordpress par blog hai usme maine appki post padh kar right click disable kar diya hai. Woh toh ho gaya toh sir main ek post likha hoon usme code ko copy karwana hai toh aap ke post mein copy karne wala code box hai na waise mujhe bhi banana hai toh aap uska code de sakte hain pls.

    Reply
    • Blog css me ye code add karo.
      code, pre {-webkit-user-select: text}

      Reply
  4. Bhai kya aap mujhe bataoge ki aapne 5 Ads use kiye hai ek post me jinme 3 link ads hai or 2 text and display ads hai kya me bhi apni Website me ese ads lga sakta hu koi problem hogi ya nhi vese ek post me 3 ads hi use kar sakte hai,

    Reply
    • Laga sakte ho no problem.

      Reply
  5. Jumedeen bhai mujhe ye batao ki wordpress me ham post ke upar niche ads kaise lagaye post ke Ander to laga lete hai but post ke upar or niche kaise lagaye jaise website ke logo ke niche or About Author ke upar ads kaise lgaye

    Reply
    • Ad inserter plugin use karo.

      Reply
  6. Good work sir but
    Jab me Apne home page layout me apke blog ki Tarah ad format laga rha hu to footer width bhi content ke Jitni hogai h
    Dusre me Apne homepage k layout me se archive title Havana Chahta hu lekin sab Jagah se hat rha h me Chahta hu ke ye sirf category or tag field me show Kare

    Reply
    • HTML widgets me code add karo.

      Reply
  7. hello sir, mera blognewspaper theme hai usme index.php option nahi hai aur naahi koi code dikh rha hai... pls help me out mai kaise apne homepage me lgau ads.

    Reply
    • Aap plugin use kar sakte ho.

      Reply
  8. google adsense par match content kya hai. iske bare me kuch bataiye.

    Reply
  9. thnqq bhai share karne ke liye ...kaafi tym se dhoond raha tha

    Reply
  10. I want this in genesis theme.....???

    Reply
    • Why note aap studiopress se buy kar sakte ho.

      Reply

Leave a Comment

×