=== Advanced Ads – Ad Manager & AdSense === Contributors: advancedads Tags: ads, adsense, amazon, affiliate, ad manager Requires at least: 5.9 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 2.0.29 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Advanced Ads is a WordPress ad manager that puts AdSense, Amazon, affiliate and direct-sold ads anywhere on your site without editing theme files. == Description == Advanced Ads is a WordPress ad manager that puts AdSense, Amazon, affiliate and direct-sold ads anywhere on your site without editing theme files. More than 100,000 sites use it to create ads, decide where and to whom they appear, and see which ones perform. Setup takes a few minutes. Create an ad, pick a placement such as after the third paragraph, set your conditions and publish. The free plugin covers ad creation, placements, targeting, AdSense and ads.txt. Add-ons cover tracking, sticky ads, popups, geo targeting and more, and you switch on only the ones you use. [Manual](https://wpadvancedads.com/manual/?utm_source=wporg&utm_medium=link&utm_campaign=wp-linkbar-manual) | [Support](https://wpadvancedads.com/aa-links/support) | [Demo](https://wpadvancedads.com/aa-links/demo) | [Premium features](https://wpadvancedads.com/add-ons/all-access/?utm_source=wporg&utm_medium=link&utm_campaign=wp-linkbar-features) Need to know whether a feature exists, or how to set up a client's request? [Open a thread in the forum](https://wordpress.org/support/plugin/advanced-ads#new-post). = Track ad impressions and clicks = The Tracking add-on counts impressions and clicks for each ad and ad group. You choose where the numbers are stored: in your own WordPress database, or in Google Analytics. With local tracking, the Statistics screen in your dashboard filters reports by date range, ad or ad group, so you can compare banners, placements and affiliate links. Affiliate ads are tracked too, whatever network they point to. = Turn on only the features you need = Every extra feature is a separate add-on. You install and activate each one from Advanced Ads > Settings > Licenses: - **[Advanced Ads Pro](https://wpadvancedads.com/advanced-ads-pro/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)**: cache-busting, more placements, lazy loading, ad refresh, click fraud protection, parallax ads and an ad blocker module - **[Tracking](https://wpadvancedads.com/add-ons/tracking/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)**: impressions and clicks, stored locally or sent to Google Analytics - **[Sticky Ads](https://wpadvancedads.com/add-ons/sticky-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)**: fixed, sticky and anchor ads - **[PopUp and Layer Ads](https://wpadvancedads.com/add-ons/popup-and-layer-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)**: popups, layers and interstitials with timing and closing options - **[AMP Ads](https://wpadvancedads.com/add-ons/amp-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)**: AMP support and automatic conversion of AdSense ads - **[Google Ad Manager Integration](https://wpadvancedads.com/add-ons/google-ad-manager/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)**: load ad units from your Google Ad Manager account without touching ad codes - **[Selling Ads](https://wpadvancedads.com/add-ons/selling-ads/?utm_source=wporg&utm_medium=link&utm_campaign=wp-add-ons)**: sell ad space on your site, with payments and advertiser profiles - **[Geo Targeting](https://wpadvancedads.com/add-ons/geo-targeting/?utm_source=wporg&utm_medium=link&utm_campaign=features)**: show ads by visitor location You can activate or deactivate included add-ons in bulk, and add-on updates arrive through the normal WordPress update screen. An All Access license covers every add-on, including Geo Targeting, so you don't activate each one separately. = Move over from another ad plugin = Built-in importers bring your ads, groups, placements and settings over from Ad Inserter, Ads for WP and AMP for WP Ads. = What's new in 2.x = - Importers for Ad Inserter, Ads for WP and AMP for WP Ads - Ads, placements and groups are searchable from the WordPress Command Palette - Ad expiry runs on Action Scheduler instead of WP-Cron - Fewer database queries on admin pages, faster ad rendering and faster weighted rotation in large groups - Bulk activate and deactivate for included add-ons, plus license syncing from the Licenses screen - A warning when another ad plugin is active and may conflict with Advanced Ads = Ad management = - Create and display unlimited ads - Rotate ads and put them into groups - Schedule ads with a start time and an expiration date - Inject ads into posts and pages automatically, with no coding - Disable all ads on specific pages - Show an ad label such as "Advertisements" above each banner = Ad types = - Insert ads from any ad or affiliate network, including Google AdSense, Amazon Associates, BuySellAds, Google Ad Manager, Ezoic, media.net, Booking.com, Tradedoubler, Awin, GetYourGuide, MonetizeMore, The Moneytizer and Infolinks - Dedicated AdSense ad types: text and display ads, native ads (In-article, In-feed, Multiplex), Auto ads and Auto ads for AMP - Images and image banners - Rich content ads built in the WordPress editor - HTML, CSS, JavaScript or PHP code - Shortcodes from other ad plugins such as Ad Inserter, AdRotate, Quick AdSense, AdSanity, Ads for WP or WP QUADS = Ad placements = Placements insert ads in set positions in your theme and content. See the [full list of placements](https://wpadvancedads.com/manual/placements/). - After any paragraph, headline, image or other HTML element - At the top or bottom of the post content - Before the closing `` tag or in the footer - In sidebars and widgets - As page peel banners - In template files with PHP functions, or anywhere with shortcodes - On other sites, with the ad server placement - A/B tests and split tests between ads - More positions through add-ons = Display conditions = Show ads based on content. See the [list of display conditions](https://wpadvancedads.com/manual/display-conditions/). - Individual posts, pages and other post types - Posts by category, tag, taxonomy, author and age - Archive pages by category, tag and taxonomy - Special page types such as 404, attachment and front page - Hide ads on secondary queries, in the post feed, and from bots and web crawlers - Keyword targeting and URL parameters with Advanced Ads Pro = Visitor conditions = Serve ads based on who is visiting. See the [list of visitor conditions](https://wpadvancedads.com/manual/visitor-conditions/). - Mobile, tablet or desktop - User role and logged-in status - Geolocation, referrer, user capability, browser language, ad blocker, IP address, browser and browser width with Advanced Ads Pro - Time of day and frequency capping with Advanced Ads Pro = Google AdSense = - Unlimited AdSense ads - Pull ad units directly from your AdSense account - See AdSense earnings in WP Admin - Change ad type and size from WordPress, without opening your AdSense account - Support for display, In-feed, In-article and Multiplex ads, Auto ads and Auto ads for AMP - Ads are hidden on 404 pages by default, to follow AdSense terms - AdSense verification code and Auto ads code insertion - Ad Health checks for AdSense violations - An ads.txt file with the right AdSense information, generated for you - Works alongside Google Site Kit, or replaces it if you want control over placements - Fallback ads for unfilled AdSense blocks with Advanced Ads Pro = Affiliate marketing = - Unlimited affiliate ads and banners, including text links - Automatic insertion and targeting - Affiliate disclosure - A dedicated ad type for the Amazon Affiliate WordPress Plugin (AAWP) - Works with Pretty Links, Thirsty Affiliates, Lasso and other affiliate plugins - All Amazon ad formats and all affiliate networks - Link masking and cloaking with Advanced Ads Pro = Ad blockers = - Basic protection so ad blockers don't break pages that run plugin scripts - A visitor condition that targets people using an ad blocker - Alternative content, fallback ads, overlays and redirects for ad blocker users with Advanced Ads Pro - More in the [ad blocker tutorial](https://wpadvancedads.com/manual/ad-blockers/) = Privacy and consent = - Hide ads that need consent until the visitor gives it - Works with Cookie Consent, Borlabs Cookie, Complianz, GDPR Cookie Consent and other consent managers - IAB TCF 2.2 consent with any CMP, including Quantcast Choices, iubenda, Google Funding Choices and Cookiebot - Non-personalized AdSense ads where the law allows = Integrations = Advanced Ads works with BuddyBoss, BuddyPress, bbPress, Elementor, Divi, GamiPress, Genesis, LearnDash, MailPoet, Paid Memberships Pro, Polylang, TranslatePress, Weglot, WPBakery Page Builder, WPML, Youzify and other plugins and themes. See the manual for setup guides. Localizations: Arabic, Chinese, Croatian, Czech, Danish, Dutch, English, French, German, Greek, Hebrew, Hungarian, Italian, Japanese, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Turkish, Vietnamese Questions? [Open a new topic](https://wordpress.org/support/plugin/advanced-ads/#new-topic-0) in the forum, or contact [premium support](https://wpadvancedads.com/support/) if you have an active license. If Advanced Ads works for you, a review helps other site owners find it. == Installation == = Using the WordPress dashboard = 1. Go to Plugins > Add New 2. Search for "advanced ads" 3. Click "Install Now" 4. Activate Advanced Ads = Uploading in the WordPress dashboard = 1. Go to Plugins > Add New > Upload Plugin 2. Select advanced-ads.zip from your computer 3. Click "Install Now" 4. Activate Advanced Ads = Using FTP = 1. Download advanced-ads.zip 2. Extract the advanced-ads directory on your computer 3. Upload the advanced-ads directory to /wp-content/plugins/ 4. Activate Advanced Ads on the Plugins screen == Frequently Asked Questions == = How do I put ads on WordPress? = Create an ad in Advanced Ads, choose a placement and publish. No code is needed. To get started, see the [first ad tutorial](https://wpadvancedads.com/manual/first-ad/), the [guide to AdSense Auto ads](https://wpadvancedads.com/adsense-auto-ads-wordpress/) and the [AdSense overview](https://wpadvancedads.com/adsense-ads). If an ad does not show, check [ads not showing up](https://wpadvancedads.com/manual/ads-not-showing-up). = How do I track ad clicks and impressions in WordPress? = Install the Tracking add-on. It counts impressions and clicks per ad and per group, and stores them in your database or sends them to Google Analytics. With local tracking you read the numbers on the Statistics screen. With Google Analytics, you read them in your Analytics account. = What are add-ons and how do I activate them? = Add-ons are separate modules that extend the core plugin with features such as tracking, sticky ads, popups, AMP and Google Ad Manager. Open Advanced Ads > Settings > Licenses to install, activate or deactivate them. An All Access license covers every add-on. = Can I switch from Ad Inserter, Ads for WP or AMP for WP Ads? = Yes. Advanced Ads has importers for all three. They bring over your ads, groups, placements and settings. Run the importer, then check your placements on the front end. = What about my visitors' privacy and GDPR compliance? = Advanced Ads has privacy settings that wait for consent before it shows ads that need it. This works for every ad you manage with the plugin, including AdSense Auto ads. You can turn the check off for individual ads, such as image ads, and serve non-personalized AdSense ads where that is allowed. - [Cookie consent integration](https://wpadvancedads.com/manual/ad-cookie-consent/) - [IAB TCF 2.2 integration](https://wpadvancedads.com/manual/tcf-consent-wordpress/) Advanced Ads itself stores no personal information, such as IP addresses, in your database and sets no cookies in the visitor's browser. See [how Advanced Ads and its add-ons handle data](https://wpadvancedads.com/manual/privacy-information-for-users/). = Which ad networks does it support? = All of them. Advanced Ads works with Google AdSense, Google Ad Manager, Amazon, Awin, Chitika, ClickBank, CJ Affiliate, ShareASale, Impact, Rakuten, Booking.com, GetYourGuide, media.net and more. You can also add network tags to your site's header or footer for header bidding. AdSense has its own ad type with its specific options. = What are the PHP functions and shortcodes? = Use shortcodes and functions to display ads and ad groups. The numbers below are element IDs. Insert an ad or group into a post or page: `[the_ad id="24"]` `[the_ad_group id="5"]` Insert an ad or group into a template file: `` `` You can also define placements and assign an ad or group to them: `[the_ad_placement id="header-left"]` `` = Is there an ad revenue share? = No. Advanced Ads does not change your ad codes, so you earn the same as you would by pasting the code into your template. For revenue sharing between authors, follow [this tutorial](https://wpadvancedads.com/publisher-revenue-share/). = Can I place ads directly in my theme files? = Yes. Add a "Manual" placement to your theme file. You can then change the displayed ads or groups later without editing the code again. = Does it work with other ad plugins? = Yes. Use their shortcodes in the "Rich Media" ad type to combine both. It works with AdRotate, Ad Inserter, Ad Injection, Quick AdSense, WP QUADS, Simple Ads Manager and others. It also runs alongside Google Site Kit, or replaces it when you need more control. = Is the plugin compatible with PHP 8? = Yes. Advanced Ads supports current PHP versions and has been tested on PHP 8. = Does it work with page builders? = Yes, with any builder that accepts shortcodes or widgets, including Elementor, Divi, SiteOrigin, Beaver Builder, Nimble Page Builder and Pagelayer. A free add-on supports WPBakery Page Builder. = Will ads show up for ad block users? = Visitors with an ad blocker, such as AdBlock Plus, won't see ads from known external sources like AdSense. You can still fill those spots with your own content. See the [ad blocker guide](https://wpadvancedads.com/manual/ad-blockers/). = Does it support ads.txt? = Yes. Google AdSense and some other networks ask for an ads.txt file. Advanced Ads can create it with the correct AdSense information. Enable it under Advanced Ads > Settings > General > ads.txt, then enter your AdSense publisher ID under Advanced Ads > Settings > AdSense. = I am a developer. Can I customize the plugin? = Yes. Advanced Ads offers many [hooks](https://wpadvancedads.com/codex/). == Screenshots == 1. Placements that let you inject ads anywhere into your site without coding (7 in Advanced Ads + 14 through add-ons). 2. Support for all kinds of ad types, including dedicated AdSense types. AMP is included in the AMP Ads add-on. 3. Flexible ad input with the Plain Text ad type and code highlighting. 4. Align your ads within the content. 5. Dynamically change AdSense ad options in your WordPress backend. 6. Choose where to display your ads using many conditions. 7. Use various conditions to choose who should see ads (basic plugin and more in add-ons). 8. See AdSense earnings in your WP Backend 9. Track impressions and clicks (Tracking add-on). 10. Convert AdSense ads into AMP automatically (AMP Ads add-on) == Changelog == = 2.0.29 (October 14, 2026) = - Fix: Urgent fix for version number = 2.0.27 (October 14, 2026) = - Improvement: Redesigned the Plugins-screen deactivation feedback modal - Improvement: Add rescue fallback on init to expire published ads missed by Action Scheduler cron - Improvement: Add gear icon and dropdown on the License page with Sync licenses and Disconnect Account actions, including a button to refresh licenses from the shop - Improvement: Licenses page row hides the activated sites count and domains when the license owner opts out on the Shop Account Page - Improvement: Add-on updates now run through the WordPress update system and require the latest version of each add-on - Improvement: All Access licenses cover every active add-on without activating each one and include Geo Targeting - Improvement: PHP in a plain text ad now runs only when the author of the ad may use unfiltered HTML - Improvement: Remove automatic deactivation of add-on versions from before Advanced Ads 2.0; updating directly from 1.x is no longer supported - Fix: Avoid fatal error in admin notices by ensuring the notice class exists before invoking its display function - Fix: Fatal error caused by invalid ad option data - Fix: Hide App menu item by slug instead of `:last-child` to prevent hiding add-on pages - Fix: Improved sanitization of ad wrapper attributes on shortcode injection - Fix: Fatal error caused by a missing second argument on the `http_headers_useragent` filter call during cache bot checking - Fix: Ad expiry dates on quick bulk edit could be corrupted to year 0000 when saved with incomplete data - Fix: Quick Edit expiry year not prefilling for past dates - Fix: Resolve missing update notifications by fixing API endpoint URL handling during updater class initialization - Fix: PubGuru import using fallback units instead of API ad units due to an incorrect loop variable name - Fix: PubGuru ad unit slot names mapping to the correct placement type - Fix: Resolve placement clearfix option not saving when disabled - Fix: Ad weights higher than the remaining group count now persist correctly after deleting ads, preserving delivery odds - Fix: Polyfill `react-jsx-runtime` from `window.React` on WordPress versions before 6.6 to resolve a blank License page - Fix: Prevent subscribers from accessing private ads via the AJAX ad renderer - Fix: Renewed licenses remaining expired locally even after syncing, blocking add-on installation and activation - Fix: Add safeguard against fatal errors when opening a placement assigned to a deleted ad group - Fix: Undefined property warning on Groups list when using PHP 8+ by overriding the `aria-label` method in `List_Table` - Fix: Remove plugins page `wp-cookies` dependency causing a notice on the Plugins screen in WordPress 6.9.1+ - Fix: Placement checkbox options not being disabled when unchecked; add missing null guards - Fix: Keep Dashicons visible on primary buttons in the Advanced Ads admin header - Fix: Prevent updater and Action Scheduler fatals when Free is removed during a request - Fix: Fatal error in the Ad Inserter import when its stored settings are damaged - Fix: Deprecation notice on PHP 8.2 and later in the list of AdSense ad units - Fix: Show the "Adjust Auto ads options" link in the AdSense settings again - Fix: AdSense API quota message showing "1 hours 60 minutes" and never leaving out a zero part - Fix: Saved AdSense earnings report could not be read back, so the report was requested from Google again on each view - Fix: AMP for WP Ads import left an ad without display conditions when its visibility setting was not recognized - Fix: Dashboard news feed was chosen from a fixed earnings value instead of the real AdSense earnings of the site - Fix: Fatal error when deleting an ad, group or placement by an ID that does not exist - Fix: PHP warning when importing from Ads for WP Ads or Ad Inserter and a margin or display type is not set - Fix: PHP warning on the PubGuru import when the configuration has no ad units = 2.0.26 (August 3, 2026) = - Improvement: bulk Activate all and Deactivate all for Included add-ons with license activation - Fix: fatal error when groups contain invalid ad ids - Fix: license rest api for non-post name permalinks - Fix: fatal error in Ad Health notices - Fix: license activate flow, Sites count, notice dismiss, and install crash - Fix: shortcode vulnerability for content attribute - Fix: incorrect Ad count for All view at list table - Fix: unauthorized plugin update download site was not activated on the shop. - Fix: help links and internal compatibility improvements = 2.0.25 (July 10, 2026) = - Fix: Item object (ad/group) set parent affecting shared factory instance on placement abstract - Fix: license screen download failed = 2.0.24 (July 6, 2026) = - Fix: UI fixes for Advanced Ads widget buttons on WP Dashboard on WP 7+ - Fix: a compatibility issue with group ad weights = 2.0.23 (June 30, 2026) = - Improvement: Change email address to send plugin uninstall feedback - Fix: When user interrupted custom position frontend picker selection, traces were left on localStorage object, causing JS errors - Fix: Add early bail before quick edit fillInputs function, legacy CSS on list pages updated - Fix: Make string type nullable on add_body_class functions, to prevent null values from 3rd party plugins - Fix: Adblocker notice being shown on admin pages even with Shields disabled on Brave browser - Fix: Add a button on General settings admin page to remove Adsense record from ads.txt file - Fix: Gutenberg blocks API Version 2 is deprecated since WP 6.9+, raise API to version 3 from version 6.9+ - Fix: Reduce database load on admin pages by caching ad, group, and placement list data across requests and deriving dropdowns and published-placement lookups from that shared cache - Fix: Improve ad load performance by skipping legacy meta migration when ad settings are already stored in the current format - Fix: Fix content ad output to apply responsive image and lazy-loading attributes using the current WordPress content filter API instead of deprecated functions - Fix: Improve group performance by caching each group's ad weight map for the duration of the request instead of rebuilding it on every access - Fix: Fix unsaved changes being cleared when reverting a single property on an ad, group, or placement in the editor - Fix: Fix visitor display conditions with chained OR and AND rules not evaluating correctly in some cases - Fix: Fix stale ad wrapper markup when layout options or wrapper ID and class are changed before the ad is saved - Fix: Improve weighted ad rotation performance in large groups by avoiding repeated weight recalculation during shuffle - Fix: Reduce database round-trips when loading multiple ads, groups, or placements during the same request = 2.0.22 (June 8, 2026) = - Improvement: Add compatibility check for setAccessible function on HideNoticesTest file, as it was deprecated - Fix: dismissed default notices are now permanently hide - Fix: Woocommerce plugin was injecting SQL on the WP Query of finding placements by type, suppress filters on query - Fix: Remove credentials check from fs_connect function when FS method is direct - Fix: Add safeguard on EDD Updater class if request data is not an object - Fix: Block injection ancestor search logic used str_starts_with, wont work with PHP less than 8, replaced by framework function - Fix: Add early bail for Ad Health if the top bar is hidden - Fix: Adding new ads to a group made the new ad status and name columns appear misaligned - Fix: Ad groups with four ads were not showing the show more button on groups page, wrong comparison math - Fix: All In One Video Gallery categories and tags are loaded as pages with shortcode instead of taxonomy, archive display conditions - Fix: parallax placement with published status checked - Fix: OceanWP theme product quick view conflict with GAdsense module AMP code injection on AJAX - Fix: block unterminated PHP in shortcode content overrides - Fix: Buttons, widget and notices UI style fixes for WP 7 plus = 2.0.21 (April 27, 2026) = - Fix: Ad label not applied to shortcode-rendered ads - Fix: fatal error by correcting Quick_Bulk_Edit class namespace - Fix: shortcode `ad_args` which allow remote code execution vulnerability = 2.0.20 (April 20, 2026) = - Fix: Content injection performance issues and handle more use cases = 2.0.19 (April 9, 2026) = - Improvement: Added AMP for WP Ads importer to improve ad migration accuracy - Improvement: Implemented upgrade notices from readme for new releases - Fix: support form submission issue = 2.0.18 (March 26, 2026) = - Feature: importer for Ads for WP to migrate ads, groups, placements and settings. - Improvement: Add Ad Inserter importer - Improvement: Replace WP-Cron with Action Scheduler for Ad Expiration - Improvement: Brave browser adblocker fallback ads were not triggered, Brave allows detection script through - Improvement: Test plugin compatibility with WordPress 6.9. - Improvement: Optimize ad rendering by replacing DOM parsing with native PHP regex processing - Improvement: Remove Amazon Integration banner from dashboard and disable PEF Module - Improvement: Add Ads, Placements, and Groups to Command Palette - Fix: fallback images show correctly based on user consent and non-personalized option - Fix: Fix nested rendering of sidebar and header placements by optimizing injection logic - Fix: Fix multiple WPML bugs, including disabling translations for groups, fix placements not showing translated ads and grous - Fix: Adds scheduled ads to the Gutenberg widget dropdown selector, if scheduled ad is selected, will only show when published - Fix: AMP - Responsive add-on license field not showing up on License Settings - Fix: Duplicated ads not showing on ad group when added via metabox, deleted ads not being cleared from group ad weights - Fix: Change the trigger logic of new placement modal when no placements, trigger hashchange event (on dialog-advads-modal.js) - Fix: Reword Advanced Ads notifications warning on Settings page, from errors to notifications - Fix: Remove Product Experimentation Module, Amazon banner from old support page - Fix: Resolved fatal error in Groups upgrade caused by namespace issue = 2.0.17 (February 3, 2026) = - Improvement: Added admin notice to warn when other ad-related plugins are active and may conflict with Advanced Ads - Fix: remove license key prompt for Slider add-on - Fix: clearfix checkbox saving and description alignment in the admin meta box - Fix: prevent removal of backslashes in ad code - Fix: screen options from Advanced Ads showing on other plugin’s pages - Fix: conflict with Fluent-SMTP plugin