Press enter to see results or esc to cancel.

Ad Counting

To insert different ads when there are multiple insertions on the page, separate the ads with [ADINSERTER COUNT] – Ad Inserter will select one ad according to the insertion counter.

For example, to insert 3 different images between first four posts on homepage (if supported by the theme) you can set Automatic insertion to Between posts, set Filter to 1, 2, 3 (to limit insertion to first 3 positions) and enable insertion on Homepage and then use the following code:

<img style='height: 400px;' src="http://malsup.github.io/images/p1.jpg">
[ADINSERTER COUNT]
<img style='height: 400px;' src="http://malsup.github.io/images/p2.jpg">
[ADINSERTER COUNT]
<img style='height: 400px;' src="http://malsup.github.io/images/p3.jpg">

Ad Inserter will insert image 1 between posts 1 and 2, image 2 between posts 2 and 3 and image 3 between posts 3 and 4.

Normally the order of insertion of the codes will be the same as configured. Use [ADINSERTER COUNT="shuffle"] for the FIRST separator only to shuffle the codes so the insertion will be randomized.

When there are multiple insertions on the page you can use Filter (button Misc) to define which insertions are enabled.

ad inserter filter

Previous versions of the plugin used the |count| separator for counting. This separator will continue to work.

Shortcodes as separators are used also for ad rotation and separation of AMP code. The order of processing separator shortcodes is the following:

  1. [ADINSERTER COUNT]
  2. [ADINSERTER ROTATE]
  3. [ADINSERTER AMP]

This means that you can have AMP separator inside ROTATE options and they can be used as COUNT options.