Home / Admin / Hide Elementor AI Image
Duplicate Snippet

Embed Snippet on Your Site

Hide Elementor AI Image

stefanie morris PRO
<10
Code Preview
php
<?php
/* 
  * Hide Elementor image optimization ads when choosing the post's featured image on the backend
  * UPDATE: 20/06/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">	
      /*
       * Hide Elementor image optimization ads when choosing the post's featured image on the backend, frontend       
      */      
        .elementor-control-notice.elementor-control-notice-type-info,  
        .e-notice--cta,
  	.e-featured-image-ai,
  	.e-image-ai-insert-media,
        .e-excerpt-ai{
              display: none!important;
      } 
  
/* 
 * Hide the first element with class "css-1hboo5q" and all elements with class "css-1hboo5q"  
 * You will get Image optimizer ads on Elementor > Home > Expand your design toolkit
*/		  
.css-1hboo5q:first-child,
.css-1hboo5q {
    opacity: 0!important; /* Force opacity to 0, ignoring inheritance */
    height: 258.36px;
    width: 401.9px;
    pointer-events: none; /* Disable pointer interactions */
    cursor: none; /* Remove cursor display */
    position: relative; /* Set positioning relative to its container */
    z-index: 1; /* Set stacking order to be above other elements */
}
  
/* 
 * Hide the "Generate with Elementor AI" button in Media Library
*/   
#e-image-ai-attachment-details, 
#e-image-ai-media-library {
      opacity: 0!important;/* Force opacity to 0, ignoring inheritance */
      pointer-events: none;/* Disable pointer interactions */
}
      </style>
	<?php
 } 
add_action( 'admin_head', 'hide_elementor_nag_admin' );

Comments

Add a Comment