Please make sure to visit Your AdSense Page where you can find personalized information about your account to help you succeed with AdSense.

Code implementation guide

Insert ad unit code into your WordPress site

You can use plugins, themes, or widgets to place ads in WordPress. #wordpress

There are several ways to place AdSense ad unit code into your WordPress site. Below, you'll find information about some ways to do this.

Tip: Make sure that you've already created the ad units that you need in your AdSense account.


If you're not familiar with coding, but you'd still like to place your ads in specific placements on your site , you might find it useful to use an ads plugin. You can find plugins in the WordPress Plugin Directory.

An ads plugin can have extra features that help you to place ads without writing or editing code.

When choosing a plugin here are some things to keep in mind:

  • Make sure that your theme and plugin are compatible.

  • All plugins offer different features. We recommend that you test a few plugins to find the best fit for you and your site.

  • Google is not responsible for the actions of non-Google plugins.

Note: You might not be able to implement some ad formats through plugins. If you need assistance with a plugin, contact the plugin developer directly.

WordPress Themes

Themes are a good option if you want an easy way to manage the placement of ad units on your site. We advise you to select WordPress themes that are "optimized" for AdSense. These themes provide predefined spaces and locations where you can place ad code on pages or post elements of your WordPress site.

Bear in mind that using themes with predefined spaces and locations might restrict you from placing your ad units exactly where you want. Additionally, these themes might not support the layout that best suits your content.

For more information on themes and how to use them, see the official documentation.

Some themes have an "ads section" built in, but if your theme doesn’t have one, then the easiest way to add your ad units is to use Text Widgets.

Note: You might not be able to implement some ad formats through themes.

Text Widgets

A Text Widget allows you to add ad units into your WordPress site, in the predefined spaces and locations available from your site's theme.

For more information on Text Widgets and how to use them, see the official documentation.

Note: You might not be able to implement some ad formats through Text Widgets.

Was this helpful?

How can we improve it?
Clear search
Close search
Google apps
Main menu
Search Help Center