Skip to content

Instantly share code, notes, and snippets.

@Fullstak-nl
Created July 22, 2024 18:54
Show Gist options
  • Save Fullstak-nl/3b0edc66b5a4b78b6ad1b288465dbbd7 to your computer and use it in GitHub Desktop.
Save Fullstak-nl/3b0edc66b5a4b78b6ad1b288465dbbd7 to your computer and use it in GitHub Desktop.
<?php
/*
* Hide Elementor image optimization ads when choosing the post's featured image on the backend
* UPDATE: 09/05/24 Hide Elementor image optimization ads on Media Library, if closing the "x" is not enough.
*/
function hide_elementor_nag_admin() {
?> <style id="remove-nag">
.elementor-control-notice.elementor-control-notice-type-info,
.e-notice--cta{
display: none!important;
}
.css-1hboo5q:first-child,
.css-1hboo5q{
opacity: 0!important;
height: 258.36px;
width: 401.9px;
pointer-events: none;
cursor: none;
position: relative;
z-index:1;
}
</style>
<?php
}
add_action( 'admin_head', 'hide_elementor_nag_admin' );
@boereworswizard
Copy link

Doesn't seem to work for me?

@Fullstak-nl
Copy link
Author

Doesn't seem to work for me?

Will look into it. You sure you've added it in the right spot and if needed cleaned all caches etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment