Skip to content

How to insert adsense ads in wordpress feed?

WordPress automatically creates many blog post list pages. These are channel pages and you can place Google AdSense ads between posts in these channels. This is another way to increase your AdSense earnings without any extra effort. In this article, we’ll explain how to create in-feed ads and embed AdSense ads in a feed in WordPress.

Feed Ads and WordPress Feeds

adsense ads in wordpress In our previous article, we explained the problem with WordPress RSS feeds and how to completely disable them for external distribution. The term “ads in the feed” can easily confuse you when thinking about placing them in RSS feeds. However, it is not. Previously, Google offered AdSense ads for channels that can be emailed to channel subscribers. However, Google has discontinued these in-feed ads and introduced their own in-feed ads. In terms of ads in a feed, a feed is a list of content that users can scroll through and read. Google clarifies this on their help page by mentioning the note below:

Note. For in-feed advertising purposes, the feed does not refer to a web syndication feed, such as RSS.


In this context, below are some of the WordPress archive pages that you can use to insert AdSense ads into your feed.

In all of these cases, make sure your page layout displays a properly aligned list of posts as a list or cards. The masonry view may not work because the alignment between the posts may change in the layout.

In a typical scenario, you can’t place display ads in these channels and miss out on the opportunity to generate additional revenue. However, in-feed AdSense ads fill that gap, and you can place them beautifully without compromising layout and usability.

Create AdSense ads in your feed

Google allows you to create in-feed ads in two ways. One is to use Google’s automatic layout design, and the other is you can manually create an ad that matches your layout. In our opinion both methods will result in the same display and you can try whichever suits your needs.

  • Sign in to your AdSense account and go to the “Ads” section.
  • Go to the By Ad Units tab and select the Ads in Feed option.
Native in-feed ads in AdSense
Native in-feed ads in AdSense
  • As mentioned, you will see two options for creating in-feed ads.
Choose a method for creating an ad style
Choose a method for creating an ad style

Creating an ad style manually

Select the “Create Ad Style Manually” option if you want to test and select the styles yourself. You’ll see a list of ad styles with different image and text positions. Choose the one you like to continue.

Choose an ad style manually
Choose an ad style manually

On the next screen, you will see a preview along with a few options to customize the style.

Customize settings
Customize settings

Using the style recommended by Google

We recommend choosing this option as it is simple and goes well with your layout.

  • Select the “Let Google suggest style” option.
  • Enter the URL of your WordPress archive page.
  • Select mobile or desktop scanner (you can change this on the next screen when previewing).
  • Click Scan Page.
  • Google will start crawling your feed to determine the layout.
Scanning a page for filing
Scanning a page for filing
  • You’ll then see a preview of the blog posts on the page, along with a preview of the auto-suggested in-feed ads.
  • You can block any page within a page and Google will change the suggested ad style accordingly.
  • You can optionally change the scanner to desktop and re-crawl the page to preview suggested ads in your desktop feed.
Ad preview in feed
Ad preview in feed
  • By clicking on the “Next” button, you will go to the last page of settings, similar to creating an ad style manually.
See also  How do I set up ads with AdSense Recommended Content

Setting up in-feed ads

As you can see, there aren’t many customization options available for in-feed ads.

  • You can resize the page and check how the feed ads will look on your page.
  • Enter a unique ad unit name that you can track in your performance reports.
  • Be sure to select the “Allow Selected Display Ads” option in the “Global Options” section. This will allow Google to display regular display ads instead of in-feed ads on feed pages if necessary. in essence, this means that you can earn more income by enabling this option.
  • Select a font for the text content of the ad.
  • Click the “Save and get promotional code” button.
Get an ad code in the feed
Get an ad code in the feed
  • You will see the ad code in the feed on the next screen and copy it by clicking the “Copy Code Snippet” link. You can save this code in a word document for use on your website.

Feed ad placement tips

In-feed ads should only be placed between feed blocks on archive pages.

  • Avoid placing in-feed ads on regular content and use display ads instead.
  • Similarly, don’t advertise in your feed in the sidebar or footer area.
  • Make sure your content’s main container has a flexible height. This is important because a container with a fixed or maximum height will result in ads appearing in your mailbox and may violate the AdSense policy.
  • You can place ads in your feed at the top, at the bottom, or between post blocks in your feed.

Inserting AdSense Ads in WordPress Feed

WordPress has several default options for inserting custom HTML code. You can insert your AdSense promotional code into widget areas such as the sidebar and footer using the Custom HTML widget. You can also easily insert ads into content using the Custom HTML block. Many commercial WordPress themes offer a custom ad bar for inserting ad codes into the content area. In addition, you can use hooks to insert into predefined places in your theme. This hook element is available in popular themes like GeneratePress or Astra.

See also  How to use the ad balance feature in Google AdSense?

However, we do not see any theme that allows you to insert ads in the archived feed. Hence, the only and easy option is to use an ad plugin. Luckily, there are several WordPress plugins available for this purpose. In this article, we will talk about the Ad Insert plugin, other plugins like Advanced Ads also offer a similar feature.

  • Install and activate the Ad Inserter plugin on your WordPress site.
  • Go to Settings > Ad Insertion and put the Google AdSense ad code in your feed into one of the ad units. You have 16 blocks, select any and paste the ad code into the editor.
Paste promotional code
Paste promotional code
  • The plugin allows you to insert ads in the feed in several ways. You can simply enter the number of posts or specify the frequency between posts. For example, inserting “Between posts” and “%3” will insert the same ad unit after every 3 posts on the channel archive page. You can adjust the embed frequency according to the number of posts available on archive pages and the number of ads you want to show.
  • You can choose one of the default alignment options or enter your own CSS in the box to manually adjust the alignment.
  • Be sure to select search pages, category pages, and tag/archive pages to show ads in your feed.
Adjust position and placement
Adjust position and placement
  • Once you have finished setting up the placement, click the Miscellaneous tab and go to the Insert section.
  • Select the “Insert in Loop Only” check box to only insert ads in the archived post loop.
Various Paste Options
Various Paste Options
  • Click the Save Settings 1-16 button and save your changes.
  • Check the blog index or any other archive page on your site to make sure the in-feed ads are displaying correctly without breaking the layout.
  • It may take 10 to 20 minutes for the ad to display, especially if it’s a new block of ad code from your AdSense account.
See also  Google Adsense plugin for WordPress

Final words

In recent days, Google has expanded the features of the AdSense account and offers multiple ad formats. AdSense ads in feeds can increase your income, especially if you have a lot of archived pages. It’s also a way to use archive pages to generate additional revenue that would otherwise go unnoticed. You can check your ad unit’s performance report and decide how much money you’re making from in-feed ads. In case you are not making much money, you can disable ads in the feed at any time by disabling the ad block code in the plugin or by disabling the plugin completely.

Leave a Reply

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