50% OFF Adsterra AI Powered Batch 5$49 $24.50 Ends in 00d 00h 00m 00s Claim Deal →

Adsterra WordPress Guide: How to Add Adsterra Ads to WordPress the Right Way

Adsterra WordPress Guide: How to Add Adsterra Ads to WordPress the Right Way

A clean Adsterra WordPress setup is the difference between ads that earn and ads that cause trouble. Most problems come from where and how the code is pasted, not from Adsterra itself. Ads don’t show, they show twice, or they slow the whole site down.

I am Humair Ahmad. I run Adsterra on my own WordPress sites and teach this setup to my students. This guide shows the clean way to add Adsterra ads to WordPress, step by step, in plain English.

Before you start your Adsterra WordPress setup

  • Your website is approved in your Adsterra publisher account.
  • You’ve created the ad units you want (Popunder, Social Bar, Native Banner or Banner).
  • You have admin access to WordPress.
  • You have a recent backup of your site, just in case.

Not sure which units to create for your Adsterra WordPress site? My guide to Adsterra ad formats explained covers what each one does and where it fits.

Golden rule: paste the code exactly as Adsterra gives it

Copy the code from the GET CODE button and paste it without any changes. Adsterra’s publisher terms don’t allow altering the ad tag without written consent, and even a missing character can stop ads from showing.

Avoid pasting codes into the visual editor or a normal paragraph block. These can change the code silently. Always use a code plugin, an ad plugin or a Custom HTML block.

Which Adsterra WordPress method should you use?

Ad format Best method Where it loads
Popunder Header and footer plugin Every page
Social Bar Header and footer plugin Every page
Native Banner Ad plugin or Custom HTML block After post content
Banner Ad plugin, widget or Custom HTML block In content or sidebar

Option 1: Header and footer plugin (for Popunder and Social Bar)

Popunder and Social Bar codes load on every page, so they belong in your site-wide header or footer.

  1. Install a header and footer code plugin such as WPCode.
  2. Open its Header & Footer settings.
  3. Paste the Popunder or Social Bar code into the section Adsterra’s instructions name (usually the footer, before the closing body tag, or the header).
  4. Save and clear your cache.

Use one plugin for all site-wide codes in your Adsterra WordPress setup. When codes are spread across a plugin, the theme and a widget, it becomes hard to find and update them later.

Option 2: Ad plugin (for Banners and Native Banners)

For ads inside your content, an ad plugin like Ad Inserter or Advanced Ads gives you precise control.

  1. Install the plugin and create a new ad block.
  2. Paste the Banner or Native Banner code.
  3. Choose the position: after the first paragraph, in the middle of posts, or after the content.
  4. Exclude pages where ads don’t belong, like contact, login or checkout pages.

Why ad plugins help your Adsterra WordPress income

Ad plugins let you move a banner with a few clicks instead of editing every post. That makes testing placements fast, which is how you find the layout that earns the most on your own site.

Option 3: Widget or block

For a sidebar banner, go to Appearance > Widgets, add a Custom HTML block, paste the code and save. In the block editor you can do the same inside a post with a Custom HTML block.

This method is fine for one or two ads. For more than that, an ad plugin is easier to manage.

Why I avoid editing theme files

Some tutorials tell you to paste ad codes straight into header.php or footer.php. It works, but I don’t recommend it for an Adsterra WordPress site.

When your theme updates, those edits can be wiped out and your ads disappear without warning. A code plugin keeps your codes safe through theme updates and keeps them all in one place.

If you already edited theme files in the past, move those codes into a plugin. Delete them from the theme first so they don’t run twice.

Your first Adsterra WordPress setup in 15 minutes

If you are starting from zero, follow this order. It is the same simple routine I use with new students:

  1. Install WPCode and paste your Popunder code in the footer section.
  2. Install Ad Inserter or Advanced Ads and add one Native Banner after post content.
  3. Exclude your contact, login and checkout pages from ads.
  4. Clear your cache and open a post in an incognito window.
  5. Check the ads on your phone as well as your computer.
  6. Wait a week, then review your Adsterra statistics before adding anything else.

That is a complete Adsterra WordPress starter setup. Add a Social Bar or a Banner later, one at a time, so you can see what each change does.

Best Adsterra WordPress placements that don’t hurt visitors

  • Native Banner: right after the article content, where readers look for what to read next.
  • Banner: after the first or second paragraph, and in the sidebar.
  • Social Bar: one per page is enough.
  • Popunder: one code site-wide. Adding it twice doesn’t double your income.

Once your ads are live, the next job is visitors. My guide on how to get traffic for Adsterra covers safe sources. Also remember that most visitors browse on phones. On mobile, the sidebar usually drops below your content, so in-content and after-content placements matter more.

Keep your site fast

  • Don’t stack many ad units on one page. Start with two or three.
  • Use a caching plugin, but clear it after every ad change.
  • Compress images (WebP is ideal) so ads aren’t fighting heavy pages for loading time.
  • Test your speed with Google PageSpeed Insights after adding ads.

A fast site keeps visitors longer, and more page views mean more ad impressions. Speed is part of your Adsterra WordPress income, not a separate task.

Adsterra WordPress troubleshooting

  • Ads not showing: test in an incognito window with your ad blocker off, then clear cache.
  • Ads showing twice: the same code is pasted in two places (for example a plugin and the theme). Remove one.
  • Layout broken: the code was pasted inside a visual editor that changed it. Use a Custom HTML block instead.
  • Joined Adsterra before October 20, 2026? Re-paste every code from GET CODE to get the new Ad Intelligence Engine.

The October 2026 code update

On October 20, 2026, Adsterra launched its Ad Intelligence Engine. Publishers who joined before that date must replace each old code with the updated one from the Websites page. Don’t create new units, because your existing codes are already updated.

My step-by-step Adsterra ad code update guide shows exactly where to look on a WordPress site. You can also read Adsterra’s own announcement on the official Adsterra blog.

Adsterra WordPress checklist

  • Codes copied from GET CODE with no changes
  • Popunder and Social Bar in one header or footer plugin
  • Banners and Native Banners in an ad plugin or Custom HTML block
  • No code pasted twice
  • Ads excluded from login, contact and checkout pages
  • Cache cleared and ads tested in an incognito window
  • Speed checked with PageSpeed Insights

Key takeaways

  • A good Adsterra WordPress setup uses a header/footer plugin for site-wide codes and an ad plugin for in-content ads.
  • Never edit the code, and never paste it in the visual editor.
  • Start with two or three ad units and keep your site fast.
  • Re-paste your codes if you joined before October 20, 2026.

See it done step by step

In my Adsterra AI Powered Batch 5 course, I show the full WordPress setup on screen: building the site, placing every format and testing which layout earns the most.

Frequently asked questions

Do I need a plugin for Adsterra WordPress ads?

Not strictly, but it is the cleanest way. A header and footer plugin like WPCode handles Popunder and Social Bar, and an ad plugin like Ad Inserter or Advanced Ads handles banners.

Where should I put the Adsterra Popunder code?

In your site-wide header or footer, using the section Adsterra’s instructions name. Add it once only, because a second copy doesn’t double your income.

Why are my Adsterra ads not showing on WordPress?

Test in an incognito window with your ad blocker off and clear your cache. If they still don’t show, re-copy the code from GET CODE and paste it into a Custom HTML block or code plugin.

Will Adsterra ads slow down my site?

Too many units can. Start with two or three, use caching, compress images to WebP and test with Google PageSpeed Insights after every change.

Can I edit the Adsterra code to fit my theme?

No. Adsterra’s publisher terms don’t allow altering the ad tag without written consent. Paste it exactly as given and adjust the placement around it instead.

H
Written byHumair Ahmad

Founder of Alcash EDU. Adsterra publisher and instructor who teaches practical online earning with AI tools.

Keep reading