Software Information

how to add google adsense code in wordpress

 

πŸ”Ή Method 1: Using a Plugin (Recommended – Easy & Safe)

Best plugins:

  • Site Kit by Google
  • Ad Inserter

Steps:

  1. Go to WordPress Dashboard β†’ Plugins β†’ Add New
  2. Search for Site Kit by Google
  3. Install & Activate
  4. Connect your Google account
  5. Link your AdSense account
  6. Turn ON Auto Ads

βœ… Done! Ads will start appearing automatically.


πŸ”Ή Method 2: Add AdSense Code Manually (Without Plugin)

Step-by-step:

  1. Login to your AdSense account
  2. Go to Ads β†’ Get Code
  3. Copy the AdSense script code

Now go to WordPress:

  1. Navigate to:
    Appearance β†’ Theme File Editor
  2. Open the file: header.php
  3. Paste the AdSense code just before </head>
  4. Click Update File

⚠️ Important:

  • If you update/change your theme, this code may be lost
  • Always backup before editing

πŸ”Ή Method 3: Using β€œCustom HTML Widget”

Good for placing ads in sidebar, footer, or inside posts

Steps:

  1. Go to Appearance β†’ Widgets
  2. Add a Custom HTML block
  3. Paste your AdSense ad unit code
  4. Save

πŸ”Ή Method 4: Using Gutenberg Editor (Inside Posts)

  1. Edit any post/page
  2. Add block β†’ Custom HTML
  3. Paste AdSense ad code
  4. Update post

πŸ’‘ Pro Tips

  • Use Auto Ads if you’re beginner
  • Use Ad Inserter plugin for full control (ads between paragraphs, etc.)
  • Make sure your site is:
    • Approved by AdSense
    • Has privacy policy & good content

🚨 Common Issues

  • Ads not showing? β†’ Wait 24–48 hours
  • Check if your site is approved
  • Disable AdBlock while testing

 

Leave a Reply

Your email address will not be published. Required fields are marked *