How to remove Yoast ads

Apanha

Staff member
 
24,549
869
3,191
Hey guys,in this tut i'll show you how to remove Yoast ads.
I have got this question from some users and i decided to post this which will may be useful for other users also.

Let's start...
Find and open the file wordpress-seo-premium/admin/banner/class-admin-banner-sidebar-renderer.php

Replace this function:
public function render( WPSEO_Admin_Banner_Sidebar $banner_sidebar ) { return sprintf( ' <div class="wpseo_content_cell" id="sidebar-container"> <div id="sidebar"> <div class="wpseo_content_cell_title yoast-sidebar__title "> %1$s </div> %2$s </div> </div>', $banner_sidebar->get_title(), $this->render_banner_spots( $banner_sidebar->get_banner_spots() ) ); }

with this:
public function render( WPSEO_Admin_Banner_Sidebar $banner_sidebar ) { return sprintf( ' ', $banner_sidebar->get_title(), $this->render_banner_spots( $banner_sidebar->get_banner_spots() ) ); }

In few words remove the div class

ENJOY
 

Attachments

11
1
1
Hey guys,in this tut i'll show you how to remove Yoast ads.
I have got this question from some users and i decided to post this which will may be useful for other users also.

Let's start...
Find and open the file wordpress-seo-premium/admin/banner/class-admin-banner-sidebar-renderer.php

Replace this function:
public function render( WPSEO_Admin_Banner_Sidebar $banner_sidebar ) { return sprintf( ' <div class="wpseo_content_cell" id="sidebar-container"> <div id="sidebar"> <div class="wpseo_content_cell_title yoast-sidebar__title "> %1$s </div> %2$s </div> </div>', $banner_sidebar->get_title(), $this->render_banner_spots( $banner_sidebar->get_banner_spots() ) ); }

with this:
public function render( WPSEO_Admin_Banner_Sidebar $banner_sidebar ) { return sprintf( ' ', $banner_sidebar->get_title(), $this->render_banner_spots( $banner_sidebar->get_banner_spots() ) ); }

In few words remove the div class

ENJOY

Using Yoast 9.0 - This directory doesn't exist: wordpress-seo-premium/admin/banner
 

skaox

 
5
1
1
Solution for 9.2 ;

/wordpress-seo-premium/admin/class-yoast-form.php

Line 186->199 just remove line 187->198
 

skaox

 
5
1
1
Sure premium is activated with your version (yoast-dummy-license) so no sidebar.

it was just in case, for info, learning,... My apologies if it was inappropriate.

By the way, thank you for what you're doing ;-!
 
Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Top Bottom