Display rules and limits
Besides its position, a campaign has two more rules on the Placement tab: the page types where it may appear and a limit on how many ads may appear together.
Display in
Switch off a page type to hide the ad there. The switches are:
| Switch | Page type |
|---|---|
| Posts | A single post of any post type. |
| Pages | A single page. |
| Excerpts | Excerpts of posts. When it is on, the campaign is also applied to excerpts. |
| Homepage | The blog homepage (the posts index). |
| Categories | Category pages. |
| Tags | Tag pages. |
| Archives | Any archive page: category, tag, author, date, custom post type and taxonomy archives. |
| Search results | The search results page. |
For example, to show an ad after the third paragraph of single posts and pages only, keep Posts and Pages on and switch everything else off.
Category and tag pages are archive pages too. If Archives is off, the ad is hidden there even when Categories or Tags is on.
A page that is none of these types, such as a 404 page, is not restricted.
Switching ads off on one post
Every post, page and other public post type has a WP Ad Inserter box in the editor sidebar with the option Do not show ads on this post. When it is ticked, no campaign shows an ad on that post, including shortcodes, widgets on that page and the Ad head code.
Ad behavior
The behavior setting limits how many ads are shown while one page is generated:
- Always display
- No limit.
- Skip if the max number of ads in this spot is reached
- A spot is a position, for example “After content”. When the spot already shows the given number of ads on this page, the campaign is skipped.
- Skip if the max number of all displayed ads on the page is reached
- The campaign is skipped when the page already shows the given number of ads from all campaigns.
With either of the last two options a Max number of ads field appears. Because campaigns are processed from the top of the list to the bottom, the order of the list decides which campaigns win when the limit is reached.
Shortcode and PHP code for theme
The Placement tab shows the shortcode and the PHP code of the campaign. See Manual in Positions.