Ad banner that can’t be dismissed
-
As a lot of people have been saying, as of RC 12.4, Yoast introduced code to add an ad banner on to every single page of wp-admin. And I mean EVERY. SINGLE. PAGE. This banner can’t be dismissed because, despite having a close cross that’s supposed to hide the banner, the actual advert click takes over unless you come at the banner very quickly from the right-hand side.
I’ve had half a dozen clients complaining about this banner already today, most saying that they can’t figure out how to get rid of it. I was hoping to find a filter to be able to disable it, but (obviously) Yoast didn’t put one in. So there are at least 4 ways of dealing with this:
1. Add this filter:
function vnmFunc_removeYoastAds() { WPSEO_Options::set('bf_banner_2019_dismissed', true); } add_action('admin_init', 'vnmFunc_removeYoastAds');
This will immediately set the dismissed trigger of the banner so that it won’t even try to appear again (that is, until the next time Yoast updates and adds a Christmas sale banner)
2. Add
?yst_dismiss_bf=1
to the end of the /wp-admin/ URL – this has the same effect as adding the filter.3. Add some CSS (thanks to xsonic’s suggestion):
function remove_yoast_bf_ad() { echo '<style> .yoast_bf_sale { display: none !important; } </style>'; } add_action('admin_head', 'remove_yoast_bf_ad');
Arguably this will hide it for as long as Yoast use the same class to display their ads; however I don’t know if they’re also adding tracking via the images (and my guess is they most likely are).
4. Uninstall Yoast. And I won’t be at all surprised if this is what a lot of people end up doing.
For shame, Yoast. This is weak af.
- The topic ‘Ad banner that can’t be dismissed’ is closed to new replies.