Tutorial Example

A Beginner’s Guide to Insert Only One Ads Before HTML Element with Ad Inserter – WordPress Tutorial

Ad Inserter is one of popular wordpress ads management plugins, it can allow us to insert ads in our wordpress posts easily. In this tutorial, we will introduce how to insert only ads before a html element with max insertion number limited.

Backgroud

You post contains 5 blocks with class EnlighterJSRAW, you only want to insert one ads in the first block, how to do?

Open ad inserter settings

Enable output buffering

Select insertion

You should select Before HTML element

Insert class name in html element input area: .EnlighterJSRAW

Select Server-side mode.

Set max insertion number and enable it.

Save all settings.

Then you will find ad inserter only insert one ads before first block.