Creating Ad Blocks
Learn how to create, configure, and place ad blocks on your WordPress site.
What is an Ad Block?
An Ad Block is a container for displaying ads on your website. Each block can be configured with:
- Ad size (e.g., 300x250, 728x90)
- Ad format (Display, Sticky, Interstitial, etc.)
- Linked GAM ad unit
- Custom targeting (key values)
Ad Formats
NoAdCode supports multiple ad formats for different use cases:
Display
Standard banner ads that appear in designated areas of your page.
Best for: Sidebar, in-content, header, footer placements
View configuration
Sticky
Ads that remain visible as users scroll the page.
Best for: Bottom of screen, sidebar that follows scroll
View configuration
Interstitial
PROFull-screen ads that appear between page loads or on scroll.
Best for: High-impact moments, between article pages
View configuration
Video
PROVideo ad player with pre-roll, mid-roll, or outstream ads.
Best for: In-content video placements, standalone player
View configuration
Cube
PRO3D rotating cube showing multiple ad creatives.
Best for: High-engagement areas, premium placements
View configuration
Code
Custom HTML/JavaScript for third-party ad networks.
Best for: Integrating non-GAM ad providers
Creating Your First Ad Block
Create a New Ad Block
Go to NoAdCode → Ad Blocks in your WordPress admin and click Create New Block or Add New. Enter a descriptive name (e.g., "Homepage Sidebar 300x250").

Tip: Use descriptive names that include placement and size for easy identification later.
Select Ad Type
Choose the ad type that best fits your placement needs:
Display
Standard banner ads for sidebar, in-content, header, or footer placements. Most versatile format.
VideoPRO
Video player with pre-roll, mid-roll, or outstream ads. Highest CPMs for video content.
Sticky
Anchor ads that stay fixed at top or bottom of viewport as users scroll. High visibility.
CubePRO
3D rotating cube showing multiple ad creatives. Eye-catching for premium placements.
Code
Custom HTML/JavaScript for third-party ad networks or custom ad implementations.
InterstitialPRO
Full-screen ads at natural transition points. Highest impact for premium inventory.
Confirm Your Network Code
Verify that the correct GAM Network Code is displayed. This ensures your ads are served from the right account.
Need to change it? Go to NoAdCode → Network → Settings to update your Network Code.
Select an Ad Unit
Choose an existing GAM ad unit from the dropdown. NoAdCode automatically fetches all available ad units from your connected GAM account.
Note: If you don't see your ad units, make sure your Google Direct Connect is active in NoAdCode → Network.

Select Lists (Page Types & Insertion Points)
Choose where your ad should appear by selecting:
- Page Types: Homepage, Single Posts, Pages, Categories, Archives, etc.
- Insertion Points: Before content, after paragraph X, sidebar, footer, etc.
Not sure about insertion points? Navigate to your live site and enable Debug Mode in NoAdCode → Settings. This will highlight all available insertion points on your pages, making it easy to see exactly where ads can be placed.

Save Changes
Click Save Changes or Publish to create your ad block. The block is now active and will start serving ads on the selected pages.
Configure Ad Block Settings (After Saving)
Go inside the Ad Block by clicking on Ad Type settings or the Add Size field. Here you can configure:
- Responsive Ad Sizes: Define different sizes for each device type (Desktop, Tablet, Mobile)
- Smart Ad Refresh: Enable automatic ad refresh to increase impressions (available for Display and Custom Sticky formats only)
- Format-specific settings: Rotation speed for Cube, triggers for Interstitial, VAST tags for Video, etc.
Device-Specific Sizes: Provide different ad sizes for Desktop (1024px+), Tablet (768px-1023px), and Mobile (up to 767px). NoAdCode will ensure each size only loads on the appropriate device for optimal performance and user experience.

Common Ad Sizes Reference
Pro Tip: Use Multiple Sizes! We strongly recommend adding multiple ad sizes per device type. This increases competition among advertisers and typically results in higher CPMs and fill rates. For example, on Desktop you might use both 728x90 and 970x250 for a header placement.
| Size | Name | Best For |
|---|---|---|
300x250 | Medium Rectangle | Sidebar, in-content |
728x90 | Leaderboard | Header, between content |
160x600 | Wide Skyscraper | Sidebar |
320x50 | Mobile Banner | Mobile header/footer |
300x600 | Half Page | Sidebar |
970x250 | Billboard | Header, premium placement |
320x100 | Large Mobile Banner | Mobile |
336x280 | Large Rectangle | In-content |
Format-Specific Configuration
Each ad format has unique configuration options. Here are examples of different format settings:
Display Ads
Configure ad size, GAM ad unit, page targeting, insertion position, and Smart Refresh settings for automatic ad refresh.


Sticky Ads (Anchor)
NoAdCode offers two sticky ad modes to choose from:
Google Anchor
Google's default anchor ad implementation. Simple setup with standard GAM behavior.
Custom StickyHeader Bidding
NoAdCode's custom implementation with Header Bidding support for higher CPMs.
Tip: Not sure which to use? Run an A/B test to compare performance between modes.

Interstitial AdsPRO
NoAdCode offers three interstitial modes to maximize your revenue:
Google Interstitial
Google's default full-screen ad. Simple setup with standard behavior.
Custom InterstitialHB
NoAdCode's custom implementation with Header Bidding support.
Google + CustomRecommended
Best of both worlds. Combines Google's reach with Header Bidding for maximum revenue.
Tip: The Google + Custom mode is recommended for publishers looking to maximize revenue. You can also run an A/B test to compare modes.
Configure trigger conditions (scroll depth, time on page), frequency capping, and close delay:


Cube AdsPRO
Configure rotation speed, number of faces, and interaction triggers.

Video AdsPRO
Video ads require two key components to display properly:
1. Content Source URL
The URL of your video content that will play in the video player.
2. VAST Tag
Your VAST (Video Ad Serving Template) tag URL from GAM for serving video ads.
Configure video player size, autoplay behavior, and VAST/VPAID settings:


How Ads Appear on Your Site
Here's how each ad format looks when displayed on your website:
Display Ad
Standard banner ads that appear in designated areas of your page. Most versatile format for any placement.
- Supports all standard IAB sizes (300x250, 728x90, etc.)
- Smart Refresh automatically rotates ads for more impressions
- Default refresh interval: 30-90 seconds (configurable)
- Viewability-aware: only refreshes when ad is in viewport


Sticky Ad (Anchor)
Ads that remain fixed at the top or bottom of the screen as users scroll. High visibility format.
- Position: Top or Bottom of viewport
- Close button appears after configurable delay (default: 5s)
- Custom Sticky mode supports Header Bidding
- Respects Better Ads Standards for user experience

Interstitial AdPRO
Full-screen ads that appear at natural transition points. Highest impact format for premium inventory.
- Triggers: Scroll depth, time on page, or page navigation
- Frequency cap: Limit impressions per user (default: 1 per session)
- Close delay: 5 seconds (Google compliant)
- Google + Custom mode recommended for max revenue

Cube AdPRO
Interactive 3D rotating cube displaying multiple ad creatives. Eye-catching format for premium placements.
- 4 faces for rotating ad creatives
- Auto-rotation interval is configurable
- User controls: Pause rotation and flip through sides manually
- Higher engagement rates than standard display

Video AdPRO
Video player with pre-roll, mid-roll, or outstream ads. Highest CPM format for video content.
- Requires: Content URL + VAST tag from GAM
- Supports VAST/VPAID for programmatic video
- Muted autoplay by default; users click to unmute/play
- Skip button after 5 seconds (configurable)

Placing Ad Blocks on Your Site
Shortcode
Copy and paste into any post, page, or widget.
[adlogic id="123"]Or use the slug: [adlogic slug="homepage-sidebar"]
Gutenberg Block
Use the NoAdCode block in the WordPress editor.
- 1. Edit any page/post
- 2. Click "+" to add a block
- 3. Search "NoAdCode"
- 4. Select your ad block
Widget Area
Add to any widget area in your theme.
- 1. Go to Appearance → Widgets
- 2. Add "Custom HTML" widget
- 3. Paste the shortcode
Managing Ad Blocks
Editing
Click the block name to edit. Changes apply immediately after saving.
Duplicating
Hover and click "Duplicate" to create a copy with all settings.
Deleting
Hover and click "Delete". This removes the block from all placements.
Next Steps
Now that you know how to create ad blocks, learn about testing and optimization.