Skip to main content

Use code ADCMDR50 for 50% off one year of Pro

Conditional display using content targeting

Content targeting allows you to specify conditions where an ad should or should not display. Content Targeting is available for individual ads in Ad Commander, and also available for groups and placements with Ad Commander Pro.

Condition targets

The following content types can be targeted:

  • Archive: Author – Archives that display posts from a specific author
  • Archive: Category – Category archives that display posts in a specific category
  • Archive: Date – Archive pages that display posts by date; Can only be targeted as is/is not, not specific dates
  • Archive: Post Type – Archive that displays posts in a specific post type
  • Archive: Tag – Tag archives that display posts in a specific tag
  • Archive: Taxonomy – Archive that displays posts in a specific taxonomy
  • Author – Single posts that are written by a specific author
  • Category – Single posts that have a specific category
  • Content Age (Days) – Content that is older or newer than a specified number of days
  • Page Template – Pages that use a specific page template
  • Page Type: 404 – The 404 page; Note that most themes do not execute the_content() on 404 pages. If you wish to display ads on your 404 page, consider implementing a template tag.
  • Page Type: Attachments – The media attachment page
  • Page Type: Blog Index – The blog page specified under Settings -> Reading; Often combined with the Post Lists placement position. This can be further limited with the ‘Pagination’ content target.
  • Page Type: Homepage – The website homepage specified under Settings -> Reading
  • Page Type: Search Results – The search results page
  • Pagination – When the page number is less than, equal to, or greater than a specified value
  • Parent Page – Pages that are children of a specified page
  • Post Content – Main post content that contains, starts with, or ends with a value
  • Post Type – The post type or custom post type of a piece of content
  • Specific Page/Post – Specific pages or posts
  • Tag – Single posts that have a specific tag
  • URL – The URL displayed in the browser

Condition targets with multiple values

Some condition targets will allow you to select multiple values. For example, “Archive: Author” will display all site authors, and you can choose multiple authors. In these cases, the target means an archive of ANY author that is selected will pass the condition.

A more realistic example of this is the “Category” condition. If you select multiple categories, it means that a post can have ANY of the selected categories to pass. It does not mean that a post has to have ALL selected categories to pass.

If you’d like an “ALL” condition like the above, create multiple content conditions that target “Category”, select 1 category in each condition, and choose “AND” as the comparison type. This means that a post must have Category 1 AND Category 2 AND Category 3.

Understanding “or” and “and” conditions

Content targeting allows you to choose both “and” and “or” conditions. These can be combined to create robust targeting options.

“Or” conditions will be considered sequentially: Condition 1 [or] Condition 2 [or] Condition 3. If any is successful, your content will be displayed. “And” conditions require each grouped condition to be true. Groups are displayed in the admin using a dividing gray line.

Combining “and” and “or” conditions creates groups of conditions. For example, if you create two “and” conditions, and one “or” condition, this creates two condition groups:

  • Condition 1 [and] condition 2 must be true OR
  • Condition 3 [or] must be true

In the below example, the ad will show if the [post type is post AND the post content contains “Ad Commander”] OR if the [post type is page].

Targeting settings screenshot

Combining with visitor conditions

When combined with visitor conditions, content targeting rules and visitor targeting rules must pass for the add to display. Learn more about visitor targeting in the visitor targeting documentation.