=== Advanced Ads – Ad Manager & AdSense ===
Contributors: webzunft, advancedads
Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RRRCEBGN3UT2
Tags: ads, ad manager, ad rotation, adsense, banner
Requires at least: 4.6
Tested up to: 5.2
Requires PHP: 5.6
Stable tag: 1.14.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Manage and optimize your ads. All ad codes, Google AdSense Auto ads, ad widget, rotation, header and footer code injection, Google AdSense partner support

== Description ==

Are you looking for a simple ad manager plugin? These are the top arguments to use Advanced Ads:

* approved in 10 years of Publishing and Ad Optimization
* Google AdSense Partner
* most features to test and optimize ads
* unlimited ad units
* ads.txt support
* dedicated Gutenberg block for ads
* works with all ad types and networks (e.g. Google AdSense, Google Ad Manager, or Amazon ads)
* the only solution with *Ad Health* integration and Google AdSense violation checks
* best rated [free support](https://wordpress.org/support/plugin/advanced-ads)

This is what our users are saying about Advanced Ads:

> We use this plugin to deliver rotating ads on a community news site, and it’s great. Both feature-rich and reliable, your imagination is the limit when it comes to the product you want to create for your users. We’ve delivered over a million ad impressions since we launched less than a year ago, using a combination of sidebar, top, sticky and in-content placements — both HTML5 and images. Advanced Ads makes it easy for our small team to deliver a good experience to our users and our advertisers.
> mytown304 on wp.org

Would you like to know if there is a certain feature, what the optimized setup would be, or how to implement your client’s demands? Just [open a thread in the forum](https://wordpress.org/support/plugin/advanced-ads#new-post)!

Based on my experience as a publisher with millions of monthly served ads, I've developed this ad management plugin for WordPress when no other solution offered testing and optimization features. It allowed us to grow to 100 MM monthly ad impressions. Benefit from this knowledge about advertising and monetize your website today!

[Full Feature List](https://wpadvancedads.com/features/).

= ad management =

* create and display **unlimited** ad units
* rotate ads
* schedule ads and set start time and expiration date
* target ads by content and user groups
* inject ads into posts and pages automatically without coding
* sell ads on your website automatically with the [Selling Ads add-on](https://wpadvancedads.com/add-ons/selling-ads/)

= ad types =

choose between different ad types that enable you to:

* insert ads content and banners from all ad and affiliate networks (e.g., Google AdSense, Amazon, BuySellAds, Google Ad Manager, DoubleClick (DFP), Ezoic, media.net, Booking.com, Tradedoubler, Awin, Getyourguide, The Moneytizer...)
* dedicated support for all types of Google AdSense ads, including text and diplay ads, native ads (In-article, In-feed, matched content), link units (standard and responsive), Auto ads, and Auto ads for AMP
* display images and image banners
* create content-rich ads with the WordPress TinyMCE editor
* create Amazon ads with the Rich Content ad type and the [Amazon Associates Link Builder](https://wordpress.org/plugins/amazon-associates-link-builder/) or insert contextual Amazon Native Shopping Ads
* inject HTML, CSS, Javascript or PHP code
* use shortcodes within ads (to also deliver advertisements from another ad plugin like Ad Inserter, AdRotate, Quick AdSense, WP Bannerize, or the Google AdSense Plugin WP QUADS)

= display ads for WP =

* use functions to display ads in template files
* use shortcodes to place them manually in post content
* show ads in the sidebar and in widgets
* disable all ads on specific pages
* display multiple ads (ad blocks)
* display a customizable ad label, e.g., “Advertisements” above each banner ad

= display conditions =

show ads based on conditions like:

* individual posts, pages, and other post types
* posts by category, tags, taxonomies, author, and age
* archive pages by category, tags, taxonomies
* special page types like 404, attachment and front page
* hide ads on secondary queries (e.g., posts in sidebars)
* display or hide banners within the post feed
* hide all ads from specific page types, e.g., 404 pages, feed
* hide ads from bots and web crawlers

= visitor conditions =

serve ads by conditions based on the visitor. [List of all visitor conditions](https://wpadvancedads.com/manual/visitor-conditions/)

* display or hide a banner by device: mobile and tablet or desktop
* display or hide a banner by role and for logged in visitors
* advanced visitor conditions: previously visited URL (referrer), user capability, browser language, browser and device, URL parameters included in [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/)
* display ads by geolocation with the [Geo Targeting add-on](https://wpadvancedads.com/add-ons/geo-targeting/)
* display ads by browser width with the [Responsive add-on](https://wpadvancedads.com/add-ons/responsive-ads/)

> **Fantastic plugin and outstanding support**
> I tried at least three other ad plugins for WordPress and ‘Advanced Ads’ is by and far the best one. Last but not least in the support. The first port of call are a number of excellent tutorials. And finally the hands on support. I don’t quite know how he does it but the speed and depth of responses are absolutely amazing.
> djsawyer on wp.org

= ad injection | placements =

Placements to insert ads in pre-defined positions in your theme and content. [List of all placements](https://wpadvancedads.com/manual/placements/)

* ads after any given paragraph or headline
* ads at the top or bottom of the post content
* ads before closing `</head>` tag
* ads in the footer
* test placements against each other with [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/)
* many more ad positions with [add-ons](https://wpadvancedads.com/add-ons/)
* automatic insertion of any kind of code into header or footer, not only advertising

= mobile devices =

* display ads on mobile and tablets or desktop only
* display responsive image ads
* ads for specific browser sizes only using [Responsive Ads](https://wpadvancedads.com/add-ons/responsive-ads/)
* inserting ads on AMP pages with [Responsive Ads](https://wpadvancedads.com/add-ons/responsive-ads/)

= Google AdSense =

Amazing features of the most powerful and easy Google AdSense plugin.

* unlimited Google AdSense ads banners
* pull ad units directly from your Google AdSense account
* show AdSense revenue in WP Admin
* change settings of your Google AdSense ads directly from your WordPress backend
* supports all Google AdSense ad types, including Google AdSense display ads, link units, native ads like In-feed ads, In-article ads, matched content ads, Google AdSense Auto ads, and Google AdSense Auto ads for AMP
* change type and sizes of an ad without going into your Google AdSense account
* hide Google AdSense advertisements on 404 pages by default (to comply with Google AdSense terms)
* insert Google AdSense code for verification and AdSense Auto Ads (previously called Page-Level ads and QuickStart)
* disable Google Auto ads anchor ads at the top of the page
* easy Ad Health integration and Google AdSense violation checks
* option to make the Google AdSense background transparent
* place Google AdSense In-feed ads using the also free [In-feed add-on](https://wordpress.org/plugins/advanced-ads-adsense-in-feed/)
* assistant for exact sizes of responsive Google AdSense code with the [Responsive add-on](https://wpadvancedads.com/add-ons/responsive-ads/)
* convert Google AdSense ads into AMP ads automatically with the [Responsive add-on](https://wpadvancedads.com/add-ons/responsive-ads/)
* ads.txt generated with the correct AdSense information automatically

Like j4ckson185, there are thousands of happy AdSense users:

> Your app is awesome, congratulations! Google Adsense suggests using your app on its official website, it’s incredible!

= ads.txt =

* generates ads.txt with custom content
* adds the content for AdSense to the ads.txt automatically

(available with WordPress 5.1)

https://vimeo.com/299410390

= ad blocker =

* basic features to prevent ad units from being removed by AdBlock and others
* prevent ad blockers from breaking sites where plugin scripts are running
* ad blocking detection: show alternative content to ad block users with [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/) and improve the monetization of your website

Learn more on the [plugin homepage](https://wpadvancedads.com).

Thank you for motivating us with your [positive review](https://wordpress.org/support/plugin/advanced-ads/reviews/?rate=5#new-post).

Localizations: Czech, Dutch, English, French, German, Italian, Japanese, Norwegian, Portuguese, Slovak, Spanish, Turkish, Vietnamese, Polish, Chinese (Taiwan)

> <strong>Add-Ons</strong>
>
> * all add-ons include priority email support
> * [Advanced Ads Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/) – powerful tools for ad optimizations: cache-busting, more placements, lazy load, ad blocker module, click fraud, and more
> * [Geo Targeting](https://wpadvancedads.com/add-ons/geo-targeting/) – display ads based on geo location of the visitor
> * [Tracking](https://wpadvancedads.com/add-ons/tracking/) – ad tracking and statistics
> * [Responsive Ads](https://wpadvancedads.com/add-ons/responsive-ads/) – create mobile ads or ads for specific browser sizes and ads on AMP
> * [Sticky Ads](https://wpadvancedads.com/add-ons/sticky-ads/) – increase click rates with fixed, sticky, and anchor ads
> * [PopUp and Layer Ads](https://wpadvancedads.com/add-ons/popup-and-layer-ads/) – display ads and other content in layers and popups
> * [Selling Ads](https://wpadvancedads.com/add-ons/selling-ads/) - allows you to sell ads on your website fully automated, including payments and advertiser profiles.
> * [Slider](https://wpadvancedads.com/add-ons/slider/) – create a simple slider from your ads

If you have problems with Advanced Ads, please reach out to [our support](https://wordpress.org/support/plugin/advanced-ads).

== Installation ==

How to install the plugin and get it working?

= Using The WordPress Dashboard =

1. Navigate to the 'Add New' in the plugins dashboard
2. Search for 'advanced ads'
3. Click 'Install Now'
4. Activate Advanced Ads on the Plugin dashboard

= Uploading in WordPress Dashboard =

1. Navigate to the 'Add New' in the plugins dashboard
2. Navigate to the 'Upload' area
3. Select `advanced-ads.zip` from your computer
4. Click 'Install Now'
5. Activate Advanced Ads in the Plugin dashboard

= Using FTP =

1. Download `advanced-ads.zip`
2. Extract the `advanced-ads` directory to your computer
3. Upload the `advanced-ads` directory to the `/wp-content/plugins/` directory
4. Activate Advanced Ads in the Plugin dashboard

== Frequently Asked Questions ==

= How to put ads on WordPress? =

You can use Advanced Ads to insert ads into your WordPress site without any coding.

To get started, just take a look at

* the [general first ad tutorial](https://wpadvancedads.com/manual/first-ad/)
* using [AdSense Auto ads](https://wpadvancedads.com/adsense-auto-ads-wordpress/) in WordPress
* the [AdSense overview page](https://wpadvancedads.com/adsense-ads).
* Ads not showing up? Take a look [here](https://wpadvancedads.com/manual/ads-not-showing-up).

= What about my users’ privacy and GDPR? =

You can show ads only to visitors that give their consent. See [GDPR support](https://wpadvancedads.com/manual/ad-cookie-consent/).

Advanced Ads itself does neither save personal information (e.g., an IP address) in your database nor cookies in the visitor’s browser.

Third party services like Google Analytics are disabled by default.

You can learn more about how Advanced Ads and its add-ons handles data and privacy of your visitors [on this page](https://wpadvancedads.com/manual/privacy-information-for-users/).

= Which ad networks are supported? =

Advanced Ads is compatible with all ad networks and banners from affiliate programs like Google AdSense, Chitika, Clickbank, Amazon, and also Google Ad Manager (Google Double Click, DFP), media.net.

You can also use it to insert additional ad network tags into header or footer of your site without coding.

AdSense has even a dedicated ad type leveling the specific options this ad network provides.

= PHP functions and shortcodes =

You can use functions and shortcodes to display ads and ad groups.

The integers in this example are the IDs of the elements.

Use these shortcodes to insert an ad or group into your post/page.

`[the_ad id="24"]`
`[the_ad_group id="5"]`

Use these functions to insert an ad or ad group into your template file.

`<?php the_ad(24); ?>`
`<?php the_ad_group(5); ?>`

In addition to directly displaying ads and groups you can define ad placements and assign either an ad or group to them.

`[the_ad_placement id="header-left"]`
`<?php the_ad_placement('header-left'); ?>`

= Is there a revenue share? =

There is no revenue share. Advanced Ads doesn’t alter your ad codes in a way that you earn less than you would directly including the ad code in your template.

= Can I place ads directly in my theme files? =

Yes. I would add a "Manual" placement into your theme files. It would allow you to change the displayed ads or groups later without changing your code again.

= Does it work with other ad plugins? =

Yes. Advanced Ads can be combined with other ad plugins.
Just use their shortcodes in our "Rich Media" ad type to combine both features.
Works with AdRotate, Ad Inserter, Ad Injection, Quick AdSense, Quick AdSense Reloaded (WPQUADS), Simple Ads Manager, and other plugins.

= Can I use Flash ads? =

There is a dedicated Flash ad type in [Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/).

= Is the plugin compatible with page builders? =

Yes. It works out of the box with all site builders that allow shortcodes or widgets, like Elementor, SiteOrigin, Beaver Builder, WPBakery Page Builder (formerly Visual Composer), [Nimble Page Builder](https://wordpress.org/plugins/nimble-builder/), and others.
There is also a [free add-on to support the WPBakery Page Builder (formerly Visual Composer)](https://wordpress.org/plugins/ads-for-visual-composer/).

= Will ads show up for ad block users? =

Visitors who have any ad blocker (e.g., AdBlock Plus) enabled won’t see ads from known external sources (e.g., AdSense).
You can still monetize those spots with custom content.

Read more about ad blockers and the features Advanced Ads has to deal with them [on this page](https://wpadvancedads.com/manual/ad-blockers/).

= Does the plugin support an ads.txt? =

Google AdSense and some other networks ask you to provide an ads.txt.
Advanced Ads can create that file automatically with the correct information for AdSense, when you enable the ads.txt feature in Advanced Ads > Settings > General > ads.txt and enter your AdSense publisher ID in Advanced Ads > Settings > AdSense.

= I am a developer. Can I customize the plugin? =

Yes. Advanced Ads is based on WordPress standards and therefore easily customizable using either WordPress hooks or the ones we defined [here](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 type. AMP is included in the Responsive 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 (Responsive add-on)

== Changelog ==

= 1.14.7 =

* allow "Footer code" and "Sidebar Widget" placements on AMP pages created by the official AMP plugin
* prevented AMP warnings on XMLRPC requests
* removed unused debug function
* made editing of AdSense ads possible in PHP < 5.5.10 (please note that Advanced Ads is recommended for PHP > 5.6)

= 1.14.6 =

* fixed frontend issue showing for admins if the HEAD placement is used

= 1.14.5 =

* sanitize Container ID option on save and warn about wrong format
* made Placements page work when another plugin includes Twitter Bootstrap
* updated missing ads.txt warning
* disabled Privacy module on AMP pages so that the Google AMP cache shows them
* fixed warnings for some features on AMP pages
* fixed suggestion to switch Auto ads code in plain text ad type to AdSense ad type

= 1.14.4 =

* fixed JavaScript issue on ad edit pages

= 1.14.3 =

* allow adding ads to newsletter emails created in MailPoet using the shortcode `[custom:ad:AD_ID]` in the email template
* prevented error when Piklist plugin is used
* fixed JS error on post edit pages that had no real consequences
* minor fixes to licensing settings (Pro only)

= 1.14.2 =

* preparations for [Advanced Ads Pro](https://wpadvancedads.com/add-ons/advanced-ads-pro/) 2.4.2
* fixed time zone difference in AdSense reporting
* fixed script dependency in the backend

= 1.14.1 =

* fixed issue with PHP 5.2 (please update to PHP 5.6.20 since it is the minimum requirement of WordPress)
* fixed potential conflict with ClassiPress ad categories
* prevented user interface from looking broken when Twitter Bootstrap is added by another source

= 1.14 =

* rewrite of AdSense code logic. Please reach out through https://wpadvancedads.com/support/ if you discover any issues
* show AdSense revenue in WP Admin
* removed parent ad group option since it was never used by Advanced Ads
* made newly installed Advanced Ads work correctly with Q2W3 Fixed Widget

= 1.13.8 =

* prevented warning about missing ads.txt file when the file exists
* added a hint about solving ads.txt issue on WP Engine platform
* allow to translate Ad Label option if WPML String Translation is used
* fixed Ad Health notices showing also ignored issues when adding a new notice
* inject ads in the outermost `the_content` when they may have been injected in an inner `the_content`
* added chain of nested `the_content` filters to `debug.log` to allow reasoning about possible issues

= 1.13.7 =

* set `ADVANCED_ADS_DISABLE_EDIT_BAR` to disable frontend edit bar
* set better default data for new AdSense ads
* when `the_content` filters are nested, use the outermost one to inject ads
* hide certain notices for a longer period even if they stay valid
* removed notice about plugin updates since WP 5.2 handles this now
* removed notice about website being hosted on wp.com
* honor "Hide ads for user roles" and "Hide ads from bots" settings when displaying AdSense verification code & Auto ads
* prevented some attachment pages containing ads from being indexed

= 1.13.6 =

* fixed missing index issue raised when Tracking settings never were saved

= 1.13.5 =

* option to hide ads by user role does now show all registered roles
* prevented possible JavaScript error in Ad Health
* updated minimum PHP version check to warn below PHP 5.6.20
* exclude LiteSpeed Cache bot from bot detection
* fixed Ad Health notices with invalid ID

= 1.13.4 =

* improved compatibility with WPML
* improved errors given when no ad units were found in the AdSense account
* improved UI when hiding ad health notices
* fixed issue when logging the AdSense Hidden problem
* fixed issue on ad filter list when two terms with the same slug exist
* fixed unlikely case of an SQL error on ad overview page
* fixed issue with Ad Health bar in frontend when jQuery was not found
* added a link to ads.txt settings from AdSense warning about missing ads.txt file
* removed unneeded ads.txt warning on com.au domains

= 1.13.3 =

* added link to get help in some error notices
* fixed error caused by ads.txt module on multisites that use WordPress lower then 5.1
* fixed compatibility with Gutenberg plugin

= 1.13.2 =

* added AdSense ad slot ID to "AdSense hidden" warning
* improved ads.txt test for existing files and other problems
* fixed broken link preventing the Privacy settings from working

= 1.13.1 =

* fixed issue with PHP 7.1 and higher

= 1.13 =

* added support for 'ads.txt'
* added option to disable Google Auto ads anchor ads at the top of the page
* prevented attachment content from being shown next to Rich Content ads on attachment pages
* allow to hide "Ads are disabled" warning
* added AdSense connection errors to notifications
* remove hidden notices if resolved
* load notices box without JavaScript
* stop content injection into wp_router pages when ads are disabled on secondary queries
* introduced `advanced-ads-max-ad-weight` filter to allow manipulating the available ad weight

= 1.12 =

* new ad health notification logic in WP Admin to show notifications and critical issues at one place
* disable Ad Health in frontend and backend using the existing "Disable Notices" option, now called "Disable Ad Health and other notices"
* prevented ad injection into excerpts
* reordered settings page

= 1.11.2 =

* removed "Limit to 3 AdSense ads" option for users who don‘t have it enabled since AdSense no longer has such a rule
* fixed filtering by ad groups on the ad list
* hide ad blocker checking code when not needed

= 1.11.1 =

* fixed AdSense code field not working if AdSense connection is missing

= 1.11 =

* improved the AdSense onboarding process
* hide idle ads in the ads list loaded from the AdSense server
* don’t inject ads into content when ads are disabled on Secondary Queries (problem caused by Similar Posts plugin)
* limited Edit-button in the frontend to ads with a container around them
* fixed issue caused by browsers with a default ad blocker
* fixed ad group filter on the ad overview page not appearing
* fixed "Ad block counter" being needed to display ads for ad blockers
* compatibility with the "Render Blocking JS" option of the WP Fastest Cache plugin
* added clearfix option to fix possible layout issue with all types of AdSense responsive ads
* use same URL field for Tracking and basic plugin
* Sticky Ads: fixed incorrect centering when parent element begins lower

= 1.10.12 =

* added function that allows Advanced Ads Pro to prevent script optimizing plugins to break ad codes
* fixed JS conflict for plain text ads using PHP or shortcodes

= 1.10.11 =

* added `advanced-ads-frontend-prefix` to adjust the frontend prefix dynamically
* placement position set to center does cause selected ad to be placed to the left
* fix ads within multiple groups not being saved
* made compatible with improved cache-busting in Advanced Ads Pro 2.3

= 1.10.10 =

* new ad block works with WordPress 5.0
* show hint when shortcode or PHP options are enabled, but not needed
* fixed long group pages not being saved

= 1.10.9 =

* fixed AdSense Auto ads check in the Ad Health bar giving false positives

= 1.10.8 =

* show hint if Auto ads are enabled
* allow responsive Adsense ads with custom sizes to be floated
* show an advice if user does not have permissions to edit ads
* fixed AdSense key overlay not accepting copy&paste in Safari and Firefox

= 1.10.7 =

* reverted code optimization that broke some forms

= 1.10.6 =

* fixed HTML issue with paragraph index when saving the placement page

= 1.10.5 =

* improved list of ads imported from AdSense account
* use width and height ad settings for image ads if they differ from the entered sizes
* added option column with shortcode to the ad list. It is optional. Go to "Screen Options" at the top right of the ad list page to enable it
* show warning if AdSense Auto ads code is used in ad code field
* added a warning if Advanced Ads constants are enabled
* prevented possible JavaScript error created by the Privacy module
* extended "Transparent Background" option for AdSense to fix a border they have in some themes
* removed ad block counter code when not used
* updated add-on updater class
* added a warning about floated responsive AdSense ads

= 1.10.4 =

* fixed posts instead of ads showing up on the ad overview list caused by 15zine theme
* fixed translation issue that caused Italian sites to not save ads properly
* removed unneeded language files since they are now hosted on wp.org

= 1.10.3 =

* removed filter for paginated ad list since it was unintentionally broken by third-party plugins
* fixed compatibility with Q2W3 Fixed Widget that gone missing with last update

= 1.10.2 =

* fixed issue with JNews theme which produced a widget ID that is blockable by ad blockers
* fixed second page on ads overview showing the same results as the first
* fixed issue that caused some items to vanish on admin pages without screen ID

= 1.10.1 =

* fixed issue caused by wrongly registered third party taxonomies
* fixed conflict on ad list with plugins going an extra query, e.g., Elementor
* added PHP version check to new AdSense connector (5.4)

= 1.10 =

* added AdSense integration
* added sub menus to setting pages
* added name to taxonomies in Display Conditions if the same label is repeated
* added clearfix option to fix possible layout issue with AdSense responsive ads
* removed title attribute from image ads
* plugin update warning now only appears for Advanced Ads plugin and add-ons
* rewritten filters on ad list to work with all ads not just those on the current page
* allowed to create new placement with same name
* fixed issue with license activations on sites using the Multilanguage by BestWebSoft plugin
* fixed duplicate queries in backend
* fixed possible conflict between assets created by the Ad Blocker module
* WP Rocket: compatibility with the recent version of deferred JavaScript

[Changelog Archive](https://wpadvancedads.com/codex/changelog-archive/)

== Upgrade Notice ==

= 1.11.1 =

* fixed AdSense code field not working if AdSense connection is missing

= 1.11 =

Improves AdSense onboarding
