How to add AdSense In-feed ads to WordPress

In-feed ads are dedicated AdSense ad codes that you can place within lists of posts. While you could do this with the default content ad units as well, In-feed ad units come with a new layout and more options.

I guess that together with the In-article ads, they will replace the current display ads format.

Creating an AdSense In-feed ad

Follow these steps to create a new AdSense In-feed ad in your AdSense account.

  1. Log in and go to Ads > Ad units and choose the In-feed ad unit to create a new one
Ad unit page in the AdSense account with In-feed ads preselected
  1. Choose a style. You can let Google AdSense scan your site to create a style for you or choose a style manually. I recommend allowing AdSense to choose a style for you and optimizing the layout later if needed.
AdSense In-feed style options from the AdSense account.
  1. You now see multiple options on the left side of the screen. The most important are:
    • Ad unit name – enter the name of the ad so that you can identify it later in the list of ads
    • Global Options > Allow selected display ads – this will increase the number of ads bidding on your view and increase revenue. Switch it off if you only want to see the default In-feed layout format you choose earlier

All the other options are more or less helping you to adjust the ad layout to your site.

In-feed ad settings
You can customize your In-feed ad to match the layout of your website

The more experienced you are with your ad setup, the more you can experiment and also run tests later.

  1. Click on Save and get code
  2. Get the code by clicking on the COPY CODE SNIPPET button
AdSense In-feed get the ad code

You can click on I’m done now and move to implement the ad code into your site.

The ad code is now stored in the clipboard on your computer. You could also save it in a .TXT file if you don‘t intend to go to the next step right away.

Adding the In-feed ad to your WordPress site

Once you have the AdSense In.feed ad code, you need to place it between posts. Most websites list those on their homepage and have archives by category or author.

Our free AdSense In-feed plugin can help you place In-feed ads on your WordPress site without any coding. Just install the basic version of Advanced Ads and this add-on.

Creating the Google AdSense In-feed ad

After installing Advanced Ads, go to Advanced Ads > Ads and click on New Ad.

  1. Enter a title for your ad – it is only visible to you.
  2. Select AdSense ad in the Ad Type box.
  3. Paste your AdSense code into the text area in the Ad Parameters box.
  4. Click on Get details.

The last step will import the details of the ad into Advanced Ads. The final setup might look like this:

in-feed in Advanced Ads

Placing the ad using the AdSense In-feed placement

Now you define where the ad should show up.

Advanced Ads separates content (ads) and positions (placements) to make you more flexible when it comes to rotating or replacing ads.

Go to Advanced Ads > Placements. If you already have placements then click on New Placement below the placement list.

Choose the AdSense In-feed placement type with the following icon, enter a name for the placement and select the ad you want to display.

AdSense In-feed position

Save the new placement.

After you saved it, search for the new placement in the list. Here you can select before which post in the frontend the ad should show up.

The example below would show the ad between the first and second post on the homepage and other archive pages.

AdSense Infeed placement optione

You can repeat these steps with different placements if you want to place an ad between multiple posts and not just at one position.

The ad code could be the same, but if you want to test which position In-feed ads work best, I would suggest using different ad codes. You can later go to the performance report and analyze the individual revenue.

Placing the ad using the post lists placement

More flexible than in-feed placement is the Post lists placement provided by Advanced Ads Pro. For one thing, you can inject any ad type into the loop with this placement. On the other hand, it is often more suitable in the application due to the secondary loops option.

In-feed FAQ

Can In-feed ads be displayed on a homepage that is a static page?

Some themes and page builders set up the homepage to be a static page, which can also be found in the Pages menu in WP Admin. 

Even though they might look like your standard WordPress post feed, they are technically not.

You can use the Post lists placement with the Secondary Loop option turned on as a solution. It will inject ads into any post feed on your website.

How many In-feed ads should I place?

AdSense does not suggest a specific amount of In-feed ads on your WordPress site, but there is still some limitation. There shouldn’t be too many ads too close together.

If you have long and full posts on your archive pages, then you could place an ad between all of them. If you show only short excerpts, I would not recommend placing advertisements before every post.

Our tests also have shown that the ads before the first articles perform best, and very often, ads before the bottom posts perform only very little or not at all. Save your site some bandwidth, and don’t place more ads there.

Where can I place an In-feed ad?

You are allowed to place the ad above, below, or within the list of posts. But you should avoid positions in your sidebar or the header next to your logo.

Is the In-feed placement compatible with AMP?

No, this placement does not support the AMP format. Use the Post Lists placement to integrate AdSense in-feed ads on AMP pages instead.

When is the AdSense In-feed visible?

Like with all new AdSense ad units, it might take up to 30 minutes until the ad shows up on your site.

With new accounts, it might even take a bit longer.

Placing other ad types between posts

Would you like to put not only AdSense In-feed ads between posts? In this case, check out the Post Lists Placement. It works with all kinds of ads.


Starting in 2009, Thomas’ own word game website grew to 40 MM page impressions per month. He then built Advanced Ads to help his colleagues to place ads and test different ad positions and networks tests without any coding skills. Thomas now enjoys improving the product for our more than 150,000 users worldwide.

Make it better

Increase your ad management skills without spending more time.
Join over 150,000 publishers and AdOpts increasing their ad revenue.