The documentation of the PopUp and Layer Ads add-on offers an overview of its features and functions. You will also find links to additional in-depth articles and tutorials here.

Usage

After you installed and activated the plugin, you find a new placement at Advanced Ads > Placements with the following icon.

Advanced Ads placement for PopUp and layer ads
Placement for PopUps and layer ads

Choose this placement and create it like any other placements with the (internal) title and the ad you would like to display.

After you created a PopUp placement, you find a few settings under advanced options in the placement options (see Placement options below)

start video
Click on the preview image to load and start video from YouTube. By clicking, you agree that your information will be sent to and processed by YouTube, LLC, 901 Cherry Avenue, San Bruno, CA 94066, USA. Read more

Settings

General Settings

Go to Advanced Ads > Settings > General > PopUp and Layer Ads to choose whether to use the Fancybox plugin to display the ads or not. Fancyboxes are more beautiful and work better, especially on mobile devices, than the default script, but it might break if you are already using this script for another purpose on your site. Hence, it is not the default option.

Placement options

When should the ad show up

Right awayThe layer shows up immediately when the page is loaded.
When the user stops scrollingThe ad appears when the user stops scrolling
After the user scrolled to the second half of the pageWhen the user stopped scrolling on the second half of the page (half down the possible scrolling distance).
After the user scrolled … pxChoose this option to set a custom scroll offset. The offset means the distance from the top of the page. In case the page is already loaded with this position, the ad is displayed right away.
When the user wants to leave the pageThe ad shows up when the user scrolls to the top of the page – mostly to close the page or enter a new address.
After … secThe PopUp appears after a custom period

Enable background

Enable this option to put an overlay on the content and only display the ad above this. The overlay will disappear when the user closes the ad. So be sure to use the close button together with this option.

Effect

Here, you can choose different effects for the ad to appear. The effect might look different for the default JS or the fancybox method.

You can also select a delay for effects.

Auto Close

If you enable this option, you can set after how many seconds the PopUp will be closed automatically.

Close button

Enable this option to allow visitors to remove an ad with a close button. You can also choose where to display this button (only for non-fancybox).

Enable the timeout, so a closed ad is not displayed to the user again within the time frame (in days). Choose “0” to disable the ad only for the current session. In this context, one day does not mean until the next day, but 24 hours after the display is closed.

Position

You can choose from 9 positions of the layer, with the screen’s center being the default option.

Options for the PopUp ads in Advanced Ads
Options of the PopUp and layer ads placement

Other notes

Please confirm with your ad network before integrating their ads as layer ads. Some ad networks (e.g., AdSense) see any positioning of their ads in a PopUp as a violation of their terms of service and might ban you when they become aware of it.

Try not to use multiple layer placements or use the ad’s display conditions to deliver only one placement to the frontend.

Some of the above options only display an ad under specific conditions and still load the ad, but hide it first. If you have an ad statistic, the impression might even show up. If you record the impressions with our Tracking Ads add-on, you will find the Delayed ads option in Advanced Ads > Settings > Tracking. Once enabled, the plugin will track ads only after they became visible.

Confirm with your ad network or ad vendor before using those options. I use those mostly to display banners and popups with my internal ads, affiliate links, or static banners (images).

Additional Options

Frequency Capping

Frequency Capping means that you don’t show the popup to the same visitor on every page view, but instead limit the delivery to a certain number of impressions. This option is especially useful for PopUps to avoid confronting users too aggressively with advertising.

To set up frequency capping for your PopUp, add the “Max. ad impressions” visitor condition to the ad unit or the PopUp placement. Now you can determine exactly how often this ad may appear within a definable period.

If you do not assign a specific ad to the PopUp placement but an ad group, you have to consider that the visitor condition works still on the ad level.

For example, you have a placement with a group containing three ads. You have set that this placement is only shown once in 10 minutes. On the first page view, the plugin counts the impression of the first ad and limited it. So that two of the three ads can still appear on the second page view. Even with the third page view, one ad from this group would again show up. After the fourth page view, the PopUp would not appear anymore.

Adjusting the button layout

You may adjust the size of the close button by applying some custom CSS attributes to it. You can find a tutorial on how to do that here.

.advads-close-button{
   transform: scale(1.5);
}

Please note that the styles added to this class will also be applied to the close button of the Sticky Ads plugin.

Trigger the PopUp with a click

Use the following information to open a PopUp with a click in addition to another trigger.

This simple code works best with the basic mode, not with the Fancybox, and if you have only one PopUp configured. Put this code either in the head or footer section of your page, e.g., by putting it into an ad unit with the plain text and code ad type and using the Head placement to inject it into the header.

Replace the string PREFIX with your site’s prefix set in Advanced Ads > Settings > General > ID prefix.

<script>
jQuery(document).ready(function(jQuery) { 
     jQuery('.showpopuplink').each(function() {
          jQuery(this).on('click', function(e) {
              e.preventDefault();
              advads_display_effect_show(  jQuery('.PREFIXlayer').attr( 'id' )  ); // replace PREFIX with your site’s prefix
          });        
     }); 
 });
</script>

Then create a link based on the code below.

<a href="#" class="showpopuplink">Show PopUp now</a>

Of course, you need to make sure that the PopUp ad is not visible directly after loading the page. This could be reached e.g., by setting a long time interval until the ad will be visible (see menu item Show The Ad: you might use “after 1209600 seconds” for example – this would be 14 days).

Remove border and background for Fancybox option

If you are using the Fancybox option to display PopUps in combination with transparent ad images then you can apply the following code to your theme’s functions.php to remove the border and background from all PopUps.

add_action( 'wp_head', function() {
?><style>
.fancybox-bg{ display: none; background: none !important; }
#fancybox-outer { background: transparent; }
#fancybox-content { border-color: transparent; }
</style>
<?php
} );

Custom close button

To add an individual close button to the ad content, just give the clickable element the class advads-close-button.

Resources