Widget
Bannerize includes a dedicated WordPress widget (wp-bannerize-widget) for displaying banners in sidebars and widget areas. The widget provides a graphical interface for configuring all display options without writing any code.
Adding the Widget
- Navigate to Appearance > Widgets in your WordPress admin
- Find the Bannerize widget in the available widgets list
- Drag it into the desired widget area (sidebar, footer, etc.)
- Configure the settings and click Save
If your theme supports the block-based widget editor (WordPress 5.8+), you can also add the Bannerize widget through the block inserter. Search for “Bannerize” in the widget area editor.
Widget Settings
| Setting | Description | Default |
|---|---|---|
| Title | Widget title displayed above the banners. Leave empty to hide the title | — |
| Categories (Campaigns) | Select one or more campaigns to display banners from | All |
| Numbers | Maximum number of banners to show | All |
| Order By | Sort order: menu_order, impressions, clicks, ctr, random | menu_order |
| Order | Sort direction: ASC (ascending) or DESC (descending) | DESC |
| Layout | Display layout: vertical (stacked) or horizontal (side by side) | vertical |
| Rank Seed | Custom seed for consistent randomization | — |
| Roles | Restrict visibility to specific WordPress user roles | All visitors |
| Geo (Countries) | Show only to visitors from specified countries (ISO codes) | All countries |
| Device | Target device type: all, mobile, or desktop | all |
| Post Categories | Show the widget only on posts in specific categories | All |
Configuration Examples
Basic Sidebar Banner
- Title: “Our Sponsors”
- Categories: Select “sidebar-ads”
- Numbers: 3
- Layout: Vertical
- Order By: menu_order
This displays three banners from the “sidebar-ads” campaign, stacked vertically in the sidebar.
Random Single Banner
- Title: Leave empty
- Numbers: 1
- Order By: random
Displays one randomly selected banner on each page load with no widget title.
Device-Targeted Widget
- Title: “Mobile Offers”
- Categories: Select “mobile-promos”
- Device: Mobile
- Numbers: 2
This widget only appears on mobile devices, showing two banners from the mobile-specific campaign.
Role-Based Visibility
- Title: “Member Deals”
- Roles: Select “subscriber”, “customer”
- Categories: Select “member-deals”
This widget is only visible to logged-in users with the subscriber or customer role. Anonymous visitors and other roles will not see it.
Geo-Targeted Widget
- Title: “Special Offers”
- Geo: US,CA
- Categories: Select “north-america”
Only visitors from the United States and Canada will see this widget.
Geo-targeting requires an IPStack API key configured in Bannerize > Settings > Geolocalization. Without it, the geo filter is ignored and the widget displays to all visitors.
Post Category Filtering
- Title: “Related Promotions”
- Post Categories: technology, reviews
- Categories: Select “tech-ads”
The widget only appears when the visitor is viewing a post in the “technology” or “reviews” categories. On other posts and pages, the widget area shows nothing.
Layout Options
Vertical Layout
Banners are stacked one below another. This is the standard layout for sidebars:
┌─────────────┐
│ Banner 1 │
├─────────────┤
│ Banner 2 │
├─────────────┤
│ Banner 3 │
└─────────────┘Horizontal Layout
Banners are displayed side by side. Best suited for wide widget areas like full-width header or footer regions:
┌───────────┬───────────┬───────────┐
│ Banner 1 │ Banner 2 │ Banner 3 │
└───────────┴───────────┴───────────┘Rank Seed
The Rank Seed setting works with the random order option. When you set a specific seed number, the random order becomes deterministic for that seed. This means:
- Same seed = same “random” order every time
- Different seed = different order
- Useful for A/B testing different banner arrangements
Leave the rank seed empty for true random ordering on every page load.
Multiple Widget Instances
You can add multiple Bannerize widgets to the same or different widget areas. Each instance is configured independently, allowing you to display different campaigns in different locations:
- Header widget area: Horizontal layout, “header-ads” campaign
- Sidebar: Vertical layout, “sidebar-ads” campaign, 3 banners
- Footer: Horizontal layout, “footer-sponsors” campaign
Each widget instance tracks impressions and clicks independently. A banner displayed in multiple widgets will have its total impressions reflect all display locations.