I’ll get straight to the point in this article, to recommend the plugin that I use to insert custom HTML code in WordPress, but not only that, also working Php code and insert Google Adsense codes to show advertising on your WordPress site.
My need in the various sites that I manage was to insert Adsense banners in the positions that I decided, and in addition through the same plugin I also wanted to insert other very simple custom code, such as the Analytics tracking code, or Google Tag manager, some hand-built banners, some code snippets without having to create php functions every time that perhaps I would have had difficulty finding or modifying.
I love simplicity and practicality, I know that every additional plugin on WordPress is a risk for security and one more thing that weighs down the site, but you also have to favor the ease of use, so I didn’t want to do everything by hand.
And so I’ve been using Ad Inserter for several years, first in the free version and then also in the PRO version, also because it has a really low cost (20€ for the Personal license that allows use on 2 sites) for everything it does, and I bought it more than gladly.
All the links that I will insert in this article where I talk about Ad inserter PRO, contain my affiliate code, and I will earn 20% of each purchase of the plugin, I write it for fairness, but also to tell you that if it were not a plugin that I consider very valid, I would not recommend it, regardless of the affiliation.
The pros of Ad inserter to insert custom code in WordPress
I chose to use Ad inserter and to do this review for the following reasons:
- ease of use
- low cost
- does what it’s supposed to do without frills
- you can tell it was created by a programmer with a programmer’s mindset, not by a marketer who creates a XY plugin to offer superfluous features.
The only con I find in this plugin is that it’s a bit difficult when switching from one setting to another, the User experience should be slightly improved, but that’s exactly why you can see that it was created by a pure programmer, without frills.
I happened to contact the plugin support, for a connection problem with the server, which is actually a problem with my hosting, and it’s not an automated ticket system that answers, but the developer himself.
Of course you need to speak English both to read the documentation and to communicate with support.
How to insert custom code in WordPress
Ad Inserter can also be used in the free version to insert HTML, Php, css, images, Google Adsense code or other banners, in various points of the site and also in the header and footer.
It has a very simple interface, with different numbered tabs, each one can contain a code snippet, and then below there are the settings to decide where it will be inserted, on which devices it can be seen, exclude pages or sections of the site where it will not be shown, generate a shortcode to use in other parts of the site (for example if we prefer to manage the sidebar via widget), filter appearances by user, show the snippet x times per user, schedule appearances, and many other settings.

For example, to insert a Google Adsense code in WordPress, just copy and paste the code snippet into one of the black boxes corresponding to the tabs (15 spaces in the free version) and decide where to show it. There are many options that do not appear in most of the plugins I have tried for inserting Adsense codes on WordPress:
- choose whether to show the ad only on posts, pages, home page, search pages, category or tag
- manually choose whether to show the ad also on a single page, or a single post, or exclude a category, or individual posts.
- choose whether to show the ad only on mobile devices or on desktop, thus differentiating the advertising formats depending on the user’s navigation
- you can create placements such as sticky footer or popup, without having to resort to other plugins
In the settings section you can also insert code snippets in the header and footer, or create custom placements using WordPress Hooks
The quantity and variety of customizations that can be obtained is really vast, something that I have absolutely never seen in any other WordPress Adsense insertion plugin, this is really the best as far as I’m concerned.
I also happened to insert some hand-made HTML code snippets, such as to create banners like this one on my site MicioGatto.it:

In this case I created 4-5 different banners in HTML and css and I used the rotation function provided by AD inserter pro to rotate randomly the 5 banners, that is, every time the page loads the plugin goes to fish one of the 5 banners and shows it to the visitor.
But you can also rotate them with different criteria.

I also set each of the banners to be a WordPress Shortcode, so I could show them in other parts of the site just by using the Shortcode, and if I need to change one of the banners I know that I will only make the change once and it will update in all the positions where the banner appears.
There are so many things you can do, even more with the premium version, which in my opinion has a really low cost compared to many other plugins to insert Adsense and HTML code into the WordPress site.
These are just some of the features:
- Advanced automatic insertion of ads
- Google AdSense, Amazon, Media.net, banners and all other ads
- Insert HTML, CSS, Javascript, PHP
- Insert opt-in forms, header and footer scripts, analytics or tracking code
- Insert before, inside or after any HTML element on any WordPress page
- Support for different ads on desktop, tablet or phone
- Widgets, shortcodes
- Works with caching
- Support for responsive AdSense ads
- Support for AMP ads
- Support for detecting, replacing or hiding empty AdSense blocks
- Click fraud protection (cookie-based + IP blocking)
- Prevent invalid traffic with reCAPTCHA v3 score checking
- Place ads based on category, tag, taxonomy, post type, post ID, or URL
- Place ads based on IP address, URL parameters, cookies, or referer
- Exclude ads on individual posts or pages
- Spacing options to avoid inserting near images or headers
- Do not insert ads unless consent is given
- Insert ad codes immediately after consent is given
- Ad Scheduling
In this plugin documentation page you can see all the features
How much does a plugin cost to insert Adsense into the site
Nowadays all premium plugins for WordPress are annual subscription or paid. In my opinion this is the best plugin to insert custom code in WordPress, not only Adsense code, but also Php, Analytics code, any HTML code you can think of.
In this case the creator of the plugin offers 4 different licenses:

I hope this review was useful to you, if you need to ask me something about how Ad inserter pro works, write to me in the comments, and don’t forget, if you want to buy it, to do so by pressing one of my links, so I will repay myself a little for the time and effort of writing this article 🙂