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

About Jumedeen Khan

I'm the founder of this site and we regularly share useful and helpful information here for beginners. ❤️

Comments ( 38 )

  1. दिनेश कुमार जायसवाल

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

    • Jumedeen Khan

      permalink mein hindi workd hone par link aesa hota hai.

  2. ansari mabud

    bahut helpfull post hai bro

  3. Devendra

    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.

    • Jumedeen Khan

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

  4. Meghraj Jarwal

    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,

    • Jumedeen Khan

      Laga sakte ho no problem.

  5. Meghraj Jarwal

    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

    • Jumedeen Khan

      Ad inserter plugin use karo.

  6. Kumar

    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

    • Jumedeen Khan

      HTML widgets me code add karo.

  7. Suraj yadav

    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.

    • Jumedeen Khan

      Aap plugin use kar sakte ho.

  8. vikas tripathi

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

  9. rahul

    thnqq bhai share karne ke liye …kaafi tym se dhoond raha tha

  10. Pawan Diwakar

    I want this in genesis theme…..???

    • Jumedeen Khan

      Why note aap studiopress se buy kar sakte ho.

  11. Pavan Choudhary

    Bro kya aisa ho sakta he ki home Page par jaha sabhi articles ki summary dikhti he vahan sidebar me ad dikhai de par jab post open ho to sidebar ka ad hide ho jaye ager ha to kaise .

    • Jumedeen Khan

      Ha aysa ho sakta hai. Ek do day wait kare mai iske bare me hi post likhne wala hu. Aapki sari problem solve ho jayegi.

      • pavan choudhary

        me check nahi kar paya kya aapne iske bare me post likhi hai kya ?

        • Jumedeen khan

          Haa likhi hai aap ad injection ki help se ya jetpack ki help se widget ko hide kar sakte ho. read this post WordPress Blog Par Ad Injection Plugin Kaise Use Kare

  12. md qureshi

    khan sir maine apna blog WordPress par transfer kar diya hai ab me sabhi post me ad lagana chahta hun konsa plugin use karu

    • Jumedeen Khan

      Aap ad injection plugin use kare.

  13. paresh

    मुझे एक सवाल पूछना था की, आप के मैन page पर गूगल के तीन से अधिक advertise हैं।

    1 title के नीचे large square
    2 पोस्ट के बीछ में 2 responsive square ads
    3 side बार में एक लार्ज ad है – “Powered by Google vala”
    4 तीन txt link ads (लिंक ads तीन + तीन pitcure ads लगा सकते हैं ये मुझे पता है)
    5 आप के साइड बार पर 7 the add है Powered by Google vala” उसके बारे में मुझे जानना था …. वह कोनसा ad unit है और उसे कैसे लगाते हैं

    मैन question यह है की – तीन लिंक + 3 picture ads के अलावा साइड बार में एक्सट्रा 7th ad लगा सकते हैं ?
    2 आप का साइड बार वाला ad यूनिट Powered by Google vala” कैसे create करूँ ?

    • Jumedeen Khan

      नहीं परेश मेरे ब्लॉग पर तीन ही ad unit है.
      1. एक पोस्ट टाइटल के बाद एक पोस्ट के मिडिल में और एक लास्ट में ये तीन txt and dislay ads. साइडबार ad सिर्फ होम पेज और archives पर ही शो होत्वे है पोस्ट के साथ नहीं।
      2. पोस्ट में 3 links ad इसके अलावा ek search box यानि total 3 image ads, 3 links ad or 1 search box jo ki google allow karta hai.
      आप साइडबार में जिस powered by google ad की बात कर रहे हो वो matched code है जो AdSense ad unit limit में count नहीं होते है इसके बारे में मैंने Adsense Matched Content Kya Hai or Ise Hum Kab Use Kar Sakte Hai पोस्ट में डिटेल्स से बताया है.

  14. Ashish Sahu

    sir index.php me ye code nahi mil raha, koi dusra option please bataiye.

    • Jumedeen Khan

      Same yahi code nahi milega is jaisa yani is type ka code hoga.

  15. Vivek Choudhary

    mera blog blogger me hai aur me apni puri posts ke label change karna chahta hu. jab me new tha to bina soche samjhe label add kar diya tha. koi problem to nahi hogi na.

    • Jumedeen Khan

      Koi problem nahi hogi. Galti sudharne se humesha fayda hi hota hai.

  16. Harpreet Kumar

    nice post bro. kya apne koi ad injection me ads setting ke bare me post likhi hai bhai. muje ad injection plugin se ads bhi use karne hai

    • Jumedeen Khan

      Ha ki hai aap mozedia.com par iske bare me post padh sakte ho.

  17. prashant rathore

    thank n jume deen ji is post k liye again thank u

  18. Ravi Kumar

    bat to wahi gai. English word use kare yani wo bhi hindi – English ho hi gai.. Ab aap ye bataye aap kya karna chahte hai. kal ki post me aapne bataya tha mai hienglish hi likhunga , But Google to aapko ab utna support nahi karegi , Aur nai pidhi ke Lo jo naya internet me aayenge wo hindi me search karenge sayad aapko site na aaye . mere sath bhi aisa hi hai..
    1….. Nai pidhi ko dekhu to purana gaya purana dekhu to aane wala naya gaya confusion

    • Jumedeen Khan

      Mujhe google ke hinglish ko lekar faisle ka intjar hai or aapko ye comment par karni chahiye thi.

  19. Ravi Kumar

    hindi aur hinenglish me Google hindi ko support kar rahi hai. ye Google bilkul galat kar rahi. mujhe pata hinenglish koi language nahi hai. internet Tips aur blogging me fully hindi likhna impossible hai. Kyuki aise bahut sare word hai Jise log fully word me nahi samajhpate hai. Aur hienglish me samajh jate.. Aap kitna bhi hindi me Likh lo hienglish ka use karna hi padega. kyuki internet , technology, blogging tips me fully hindi nahi kam kar sakti. ha hindi worl karegi us blog pe jo motivation, sayari, jokes kahani.
    Q…..Upar ke point ke hisab se aap hame bataye Kya hindi me possible hai? iske liye hum blogger ko Google ke anusar nahi chalna chahiye, Agar aisa hum log karenge to automatically Google hienglish ko first pe degi . Agar uske anusar chale to bahut nuksan hoga

    • Jumedeen Khan

      Ravi hindi me bhi aap sabkuch likh sakte ho or hinglish ki jagah english word use kar sakte ho.

  20. abdul khan

    Suprb Post bhai, very help full post

Comments are closed.

Ad

I need help with ...