Individual Post and Page Exceptions
Ad Inserter provides many options to disable insertion of ads on certain posts or pages. In principle there are two approaches. The first one uses black and white lists to filter insertion on specific pages that have something in common. The second approach uses individual post and static page exceptions where you define exception for each post or static page that needs to be excluded from the general insertion rule.
You can use both approaches to limit insertions. For example, you can white-list few categories and then use exceptions to exclude insertion on some post in these categories.
Using lists to limit insertion
To show available lists click on the Lists button below the code editor.
To limit insertion to specific categories, tags, taxonomies, post IDs, urls (web addresses), referrers, cookies IP addresses or countries (PRO only) simply enter them in the appropriate list and select either Black list or White list. Black-listing means that for the listed values the code block (ad) will not be inserted, while white-listed values mean that the code will be inserted only on pages with those values. Separate values with comma or click on the small button left of the list to open list selector / editor.
If you need to exclude ads only on few pages or posts then this is the easiest approach. You can exclude few posts or pages using Post IDs list – when you click on the small button left of the list you’ll get a selection containing all static pages and posts. Simply click on the page name/ID to move it to the list. Check black/white lists for more.
Alternative approach is by specifying URLs (web addresses). For example, to exclude ads on pages
http://example.com/contact simply black-list urls:
Single pages (posts and static pages) have also additional setting for exceptions. If you are not using individual post/page exceptions (as described below) then use default value – blank selection (no individual exceptions).
If you use only lists (to filter urls, IDs, categories, tags,…) you should use blank selection (no individual exceptions) as these settings affect only individual exceptions on post/page editor pages described below.
Using individual post/static page exceptions
With this approach you can disable (or enable) insertion on individual posts or pages. For each code block to be inserted on posts or static pages you first define default insertion settings for posts or pages:
- Individually disabled means that insertion will be by default enabled on all posts or pages (according to the settings for this code block), but you will be able to disable insertion on individual posts or pages (in post/page editor)
- Individually enabled means that insertion will be by default disabled on all posts or pages, but you will be able to enable insertion on individual posts or pages (in post/page editor)
Other settings (e.g. lists) for the code block will also apply.
Then you can define individual exceptions in the post / page editor (check Ad Inserter Individual Exceptions meta box below each post editor window).
When code block has individual exceptions set on posts or static pages, there will be a small button next to Posts text. Click on this button shows a list of all individual exceptions for this code block. Click on the ID number opens post/page, while click on the title opens post/page editor to edit exceptions. Click on the small red cross in the top right corner clears all individual exceptions for this code block.
PRO Ad Inserter Pro has also additional Exceptions tab on the plugin settings tab () where you can see all exceptions on one place. Here you can open page with exceptions, open editor to edit exceptions, clear exceptions for specific block, clear exceptions for specific post or page or clear all exceptions (click on the cross in the top right corner).
For one or few exceptions it is easier to first enable insertion on all Posts/Static Pages page types (no individual exceptions – blank selection) and then either white or black-list few post IDs or urls.