Super Cool Ad Inserter Plugin

The Super Cool Ad Inserter is a WordPress plugin that gives site administrators a way to insert widgets such as ads, newsletter signups, or calls to action into posts at preset intervals. The interval setting can be overridden on a per-post basis, and you can even insert ads manually inside posts using WordPress shortcode.

Configuration

After installing the Super Cool Ad Inserter Plugin, a link to the Ad Inserter configuration panel will appear in the WordPress Plugins menu:

Super Cool Ad Inserter settings

The settings on this page control the placement and number of automatic ad zone insertions. Ad zones will appear in Appearance > Widgets as new widget areas, labeled Inserted Ad Positions, and you can populate them with whatever widgets you like. If you are using the DoubleClick for WordPress plugin, you can place DoubleClick Ad widgets in the Ad zone widget areas and manage your ads and ad inventory in Google DFP. Or you can use an Image widget or Text widget for your ad. What you place in the ad zones is totally up to you.

What Do the Super Cool Ad Inserter Settings Mean?

Number of paragraphs before each insertion, and between insertions: The automatic ad inserter will wait this number of paragraphs after the start of the article, insert the first ad zone, count this many more paragraphs, insert the second ad zone, and so on.

Number of times the ad should be inserted in a post: The absolute maximum number of ad zones that can be inserted in any post. This will set the number of Widget Areas available for ads in a post. So if you set it to 6, you'll have 6 Widget areas available for different ads:

Ad zones in the Widgets setting page

Note that depending on the number of paragraphs before each insertion, and the number of ad zones (i.e. number of times the ad should be inserted in a post), shorter posts may not display all the ads.

Also, you don't have to fill all the available Widget Areas with actual ads. If an ad zone widget area doesn't have any widgets, it will remain blank on the post page. This provides additional flexibility for placing ads where you want without disrupting the flow of the post content. Placing an ad every three paragraphs until the end of the story might get very annoying to users, so this option allows you to balance the presentation of ads along with the post.

Minimum number of paragraphs needed in a post to insert ads: If a post is very short, placing an ad in the middle of the content can be very annoying to readers. This setting allows you to prevent ads from appearing on posts with fewer paragraphs than the threshold.

Adding Super Cool Ads for Display in Posts

After you configure the plugin to set the number of paragraphs before each ad insertion, and the number of available ad insertions, visit Appearance > Widgets to create the ads themselves. You'll see a number of Inserted Ad Positions as Widget areas where you can place widgets. You can set the number of available Inserted Ad Positions in the plugin options panel. Each Inserted Ad Position widget area should have only one widget in it.

If you are using an ad plugin such as DoubleClick for WordPress, you can place that plugin's ad widget in the Inserted Ad Positions.

If you would like to manually create an ad, begin by adding a Text Widget to one of the numbered Inserted Ad Positions:

empty text widget in an Inserted Ad Position widget area

You can then enter the content of the ad in the Text Widget. Note that you may include markup including iframe content from external ad sources. You can alternatively create your own ad content, and include inline styles for the content in the Text Widget:

text widget with markup

In this case, we've added our own markup, including inline styles defined in a div wrapping the ad:

<div class="supercoolad" style="padding: 1em; border: 1px solid #ccc; background-color: #F6F7F8;"> <img src="http://borgborg.org/largoborg/wp-content/uploads/2016/02/bagpipes-e1454443678992.png" alt="man with bagpipes in front of scenic lake and mountains" style="float:left; margin: 0 1em 1em 0;"> <h2>Play the bagpipes</h2> <p>Did you know that the term "bagpipe" is equally in the singular or plural, although in the English language, pipers most commonly talk of "the pipes", "a set of pipes" or "a stand of pipes". Either way, there's nothing more welcome at holiday parties than a set of bagpipes. <a href="#">Get yours today</a> and get a 10% discount on lessons. </p> </div>

You can add CSS rules to your Largo child theme to apply styles to all inserted ads, which are contained in an aside with a class of scaip. Or in the Text Widget for each ad, you can wrap the ad in a div with whatever class defines your existing ad styles. The example above uses the class supercoolad.

With the above markup in the Text Widget in this Inserted Ad Position, the ad looks like this in the post:

an ad inside a post

Ad Display Settings

The Super Cool Ad Inserter provides lots of flexibility in how and where ads are placed within posts. By default, 2 ads will be inserted automatically in a post, beginning 3 paragraphs after the beginning and every 3 paragraphs after that. They will not appear if the post is shorter than 6 paragraphs. You can easily change these default settings for ad automatic insertion in the Ad Inserter Plugin Options panel.

Prevent Automatic Insertion of Ads in a Post

By default, once configured SCAIP will insert ads in every post. But you may have posts for which you want to exclude advertising. You can exclude ads from a given post using the "Super Cool Ad Inserter" post meta box that appears in the post editing page:

Ad Inserted meta box in the post edit screen

To exclude ads, check the box to "prevent automatic addition of ads to this post" or add the shortcode [ad no] at the start of the story. In either case, no ads will appear in the post. If you uninstall the Super Cool Ad Inserter Plugin, the [ad no]shortcodes will remain in your posts, so it is recommended to use the checkbox instead of [ad no].

Manual Ad Placement

You can override automatic placement of ads by inserting shortcodes in the body of the post wherever you want the ads placed. For example, to display the Inserted Ad Position 2 in a custom location in your post, you would use the following shortcode:

 A paragraph of text, or an image, or anything else that you would use in a story.  [ad number="2"]  The next paragraph, block quote, image, embed, link, or really anything else.  

In this case, the post will display the ad in Inserted Ad Position 2 wherever you placed the shortcode, and no other ads will automatically display. This allows you to have many Inserted Ad Positions available for some posts when needed, but display fewer ads with certain posts.

You can also reorder the display of Inserted Ad Positions by placing shortcodes for each wherever you want in the post.

Shortcodes must have an empty line between the shortcode and anything before or after the shortcode.

Ad Spacing Using Empty Inserted Ad Positions

You can add Widgets to each and every numbered Inserted Ad Position, and they will display every nth paragraph based on the number of paragraphs you defined in Plugins > Ad Inserter options.

But sometimes you might want to use the default automatic ad insertion but protect larger blocks of paragraphs from getting interrupted by an ad. Let's say the ads are set to display every 3 paragraphs, which means the first ad will appear 3 paragraphs from the beginning of the post. You can use an empty Inserted Ad Position to reserve that position without displaying an ad. In this case, we'd leave Inserted Ad Position 1 blank:

Inserted Ad Position widget areas showing the first position blank

Note that we haven't even added an empty Text Widget to this Ad Position, but just left it as an empty widget area. On the post page, the first ad won't display until after 6 paragraphs:

an ad displaying after six paragraphs inside a post

Additional Resources

Still need help? Contact Us Contact Us