When creating or editing an ad unit, you can adjust the ad layout with the ad Layout / Output options. You can define the position, margin values, and assign existing style settings by specifying a container ID or container classes.

Advanced Ads Pro offers additional options to insert custom code and display an ad only once per page.

Usage

Layout / Output options of Advanced Ads

Go to Advanced Ads > Ads and create a new ad or edit an existing ad unit. Scroll down to the Layout / Output options.

Position

With the Position option, you can align the ad to the left, center, or right inside your layout. Use the clearfix option to prevent the following elements from floating around the ad.

Please note: the configuration of your Ad Label alignment in the Placement options overrides these settings.

Margin

The Margin option allows you to add distance to adjacent elements around the ad unit. This way, you can shape the appearance of your ads inside your layout.

Example for an ad unit with and without a margin
ad layout without margin (l.) and with margin (r.)

Container ID

Specify the ID of the ad container. Leave blank for random or no id.  An id-like string with only letters in lower case, numbers, and hyphens.

Container Classes

Specify one or more classes for the container. You can separate multiple classes with a space.

Advanced Features

With Advanced Ads Pro, you get additional options to customize the appearance and behavior of your ad.

Display Only Once

This option specifies that the display is shown only once per page. This sounds trivial at first, but it is a handy feature.

A typical use case is when you have added an ad to multiple groups that rotate on different placements. Or also, when you assign a group with various ads to a manual placement, which you insert multiple times via shortcode into the content of the same page.

The goal is the same in both examples: you want to prevent your users from seeing the same ad twice. On the one hand, so they don’t get annoyed and banner-blind, on the other hand, to increase the chance that your visitors will click the ads.

By default, the first appearance of the ad in the source code is displayed when this option is checked. In combination with cache-busting, the order depends on the cache-busting option used for the ad and placement. They are checked in the following order: 1. ad positions without cache-busting, 2. passive cache-busting, 3. AJAX cache-busting.

Using rotations and limiting the appearance of ads to only one per page can break loops and cause ads not to show or rotate as intended.

Custom Code

You can customize your ad with additional HTML and CSS. Just insert your custom code into the textbox.

Advanced Ads options to adjust the ad layout
additional Layout / Output options with Advanced Ads Pro

What else you need to know

  • The ad code is practically wrapped in an additional block (div ) and inline styles for the features above.
  • The clearfix option adds a <br/> tag with inline styles behind the wrapper.
  • You don’t need to type # or . in the fields for container ID and container classes.