Luxa Affiliate Ads Injector — WordPress Affiliate Ad Manager
Create beautiful affiliate product ads, inject them automatically by keyword or CSS selector, and boost your affiliate revenue — no coding required.
What makes it different?
Most affiliate plugins just insert links. Luxa Affiliate Ads Injector lets you build rich product ad groups with images, ratings, badges, and comparison tables — then inject them automatically into the right content based on keywords or any CSS selector on your page, including elements inside your theme template.
Key Features
Ad Groups with Multiple ProductsGroup several affiliate products together — each with image, badge, price, rating, button color, and affiliate link.
4 Display TemplatesClassic, Grid, Slide/Carousel, and Comparison Table. All fully responsive, mobile-ready.
Smart Inject by KeywordAutomatically insert ads before/after paragraphs containing a keyword. Supports Exact, Contains, and full Regex matching.
Smart Inject by CSS SelectorTarget any element by class or ID — including elements inside your theme template, page builder sections, or sidebars.
CSV & XML Bulk ImportImport hundreds of affiliate products at once via CSV or XML with a live progress bar.
Shortcode SupportPlace any ad group manually anywhere using [luxa_aai_group id="1"].
Custom Post Type SupportSmart Rules work on all public post types — posts, pages, WooCommerce products, and any CPT.
Translation ReadyFull .pot file included. Compatible with WPML, Polylang, and Loco Translate.
4 Beautiful Display Templates
| Template | Best For | Layout |
|---|---|---|
| Classic | Blog posts, review articles | Full-width horizontal rows, one product per row |
| Grid | Product roundups, listicles | 2–4 column responsive product grid |
| Slide / Carousel | Mobile-first content, landing pages | Touch-enabled horizontal carousel with dots & nav buttons |
| Comparison Table | Head-to-head product comparisons | Side-by-side table with highlighted “Featured” column |
Each product card supports: product image, badge (e.g. “Best Value”, “Editor’s Pick”), price & original price, star rating, review count, custom button color, and affiliate URL with automatic rel="nofollow sponsored noopener".
Smart Inject Rules
Smart Rules let you connect an ad group to a trigger — the plugin then injects the ad automatically, without you touching individual posts.
Keyword Triggers
- Keyword Exact — matches whole words only (e.g. “camera” won’t match “cameras”)
- Keyword Contains — simple substring match, case-insensitive
- Keyword Regex — full PCRE regex for advanced matching patterns
CSS Selector Trigger Unique
- Target any element by class (
.my-class) or ID (#my-element) - Works on the full rendered page via output buffer — not just post content
- Inject Before, After, Prepend (inside top), or Append (inside bottom)
- Works with Elementor, Divi, Beaver Builder, and any theme
Example use case: You have a product review widget in your theme sidebar with class .product-review-box. Create a CSS Selector rule targeting .product-review-box — the plugin will inject your affiliate ad directly after it on every matching page, automatically.
Auto Inject (Per Ad Group)
Each Ad Group also has its own Auto Inject setting — no rules needed for simple use cases:
- Choose inject position: After Nth paragraph, Middle of content, or Bottom of content
- Filter by post category — only inject into posts in specific categories
- Set which paragraph number to inject after (e.g. after paragraph 3)
CSV & XML Bulk Import
Save hours when migrating from another tool or building a large affiliate site:
- Upload a CSV or XML file — delimiter auto-detected (comma or tab)
- UTF-8 BOM stripping and line ending normalization built in
- Live progress bar — imports in batches, no timeout issues on large files
- Groups products by
group_titlecolumn automatically - Sample CSV/XML template available to download on the Import page
group_title, product_name, price, affiliate_url, image_url, rating, badge_text “Best Cameras”, “Sony A7 III”, “$1,999”, “https://…”, “https://…”, 5, “Editor’s Pick” “Best Cameras”, “Canon R6”, “$2,499”, “https://…”, “https://…”, 4, “Best Value”
Shortcode
Manually place any Ad Group anywhere — posts, pages, widgets, or page builders:
[luxa_aai_group id=”1″]
[luxa_aai_group id=”1″ template=”grid” columns=”3″]
[luxa_aai_group id=”1″ template=”comparison”]
You can override the template and columns parameters per shortcode instance without changing the group’s default settings.
Developer Friendly
- ✓ Clean OOP architecture — all logic in dedicated classes
- ✓ WordPress Coding Standards compliant
- ✓ All inputs sanitized with
sanitize_text_field(),esc_url_raw(),absint(),sanitize_hex_color() - ✓ All outputs escaped with
esc_html(),esc_attr(),esc_url() - ✓ Nonce verification on every form and AJAX request
- ✓ Capability checks (
manage_options) before every privileged action - ✓ Custom DB tables using
dbDelta()— safe upgrades - ✓ Proper
uninstall.php— cleans tables and options on delete - ✓ Frontend CSS can be disabled via Settings for full custom styling
- ✓ Debug mode: append
?aai_debug=1(admin only) to inspect which rules fired and why
Requirements
| Requirement | Minimum |
|---|---|
| WordPress | 5.8+ |
| PHP | 7.4+ (tested on 8.0, 8.1, 8.2, 8.3) |
| MySQL | 5.6+ / MariaDB 10.0+ |
| Browser | All modern browsers |
Compatibility
- ✓ Works with any WordPress theme
- ✓ Compatible with Elementor, Divi, Beaver Builder, Gutenberg
- ✓ Compatible with WooCommerce (Smart Rules on product post type)
- ✓ Compatible with WPML & Polylang (translation ready)
- ✓ Works with all caching plugins (WP Rocket, W3 Total Cache, LiteSpeed Cache)
- ✓ Multisite compatible
Changelog
v2.1.0 Added Smart Inject Rules (keyword + CSS selector) · Full-page output buffer for selector injection · Custom Post Type support · Debug mode (?aai_debug=1) · Bug fixes
v2.0.0 Complete rewrite · Ad Groups with multiple products · 4 display templates (Classic, Grid, Slide, Comparison) · CSV & XML import with progress bar · Touch carousel
v1.0.0 Initial release
Support
All support is handled through the Envato comments tab and our dedicated support portal at luxapress.com. We aim to respond within 24 hours on business days.
Before submitting a support request, please check the included documentation (bundled in the /documentation/ folder) — it covers installation, all features, shortcode usage, and the CSV/XML import format with sample files.