Advanced Ads jumping from version number 1.4.4 to 1.4.5 seems like a minor update, but under the hood there are some great improvements and fixes. You probably won’t notice most of them, but there are two changes that might have a visible impact on your ad settings. Therefore, I wan’t to make sure you are aware of them and can check your current ad settings.
The changes might concern you if you are using
- simple display conditions (i.e. show ad only on home page, 404 page, archive pages, etc.)
- ad injection into post content
Simplified display conditions
I am currently working on the interface and usability of the display conditions and started with the “other conditions” section, because I had to fix a bug in there anyway.
From now on, all options are active by default and there is no logic for empty settings. Before the change, an empty setting ment either “show”, if there was another “hide” setting or “hide” if there was only a “show” setting enabled. Confusing? Now you probably understand why I had to change it after all.
Until version 1.4.5 the other conditions section looked like this
After the update to version 1.4.5, the same section looks like this
Looks a bit cleaner now, doesn’t it?
You might also notice that from now on, there is no empty setting anymore. All listed page types are set to “on” by default. Technically, nothing changed for most ads, because an empty setting in the previous version also ment “on”, if no other condition was checked.
The bug that I had to fix in the old version was that the following setup didn’t work
With these two boxes checked you could expect that this ad would appear on the home page or any singular page. Unfortunately, it did not show up at all, because on the home page the internal check resulted in a false, because it was not a single page and the single pages weren’t the home page.
Fixing this issue might have been rather unspectacular, but to make this work, I had to sacrifice another behavior. In the example above, checking just two options in the “show” column ment for the other four page types to not display the ads. So, the following settings ment the same:
The change I had to make now is that an empty setting is a true setting, so version A) falls back to “show the ad on all pages”. B) will be the same in the new settings.
Please check your ad settings if you were using the page type conditions by exception as in example A).
If you only used the settings in the “hide” column though, you should be fine too, because the empty settings fall back to “show”
Ad injection into post content
The second change might hit even fewer people, but I still wanted to make you aware of it.
I noticed a bug in the content injection feature of placements that didn’t take html elements with attributes into account. For example, if you injected ads before the second h2 headline, Advanced Ads searched for <h2> but missed <h2 id="anchor"> (e.g., a headline with an anchor). Attributes in paragraph and headline tags are not very common in most articles, but I wanted to fixed it anyway.
If you are sure you or your plugins don’t set attributes for headlines or paragraph then this change won’t affect you.
Just to be sure, simply check some of your most important pages for the position of the injected ad.