•   Join The Club | ENJOY new products every month. Stay always updated.   
    Speaking   English Albanian Greek
Close

By continuing to use this site, you are consenting to our use of cookies.

How to remove Yoast ads

Discussion in 'Tutorials - How to' started by Apanha, Oct 22, 2018.

  1. Apanha

    Apanha Admin Staff Member  

    Sep 29, 2016
    Admin Post
    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
     

    Attached Files:

    Tize., lara21, cteq1 and 2 others like this.
  2. Simon Hibberd

    Simon Hibberd

    Mar 10, 2017

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

    Apanha Admin Staff Member  

    Sep 29, 2016
    Admin Post
    You're right mate,from v9.x.x yoast in fact needs some changes on the code to remove the ads.
    Will do this on the next release.
     
  4. Simon Hibberd

    Simon Hibberd

    Mar 10, 2017
    Cheers!
     
  5. skaox

    skaox

    Oct 19, 2016
    Solution for 9.2 ;

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

    Line 186->199 just remove line 187->198
     
  6. Apanha

    Apanha Admin Staff Member  

    Sep 29, 2016
    Admin Post
    Don't need,we remove the ads before we upload
     
  7. skaox

    skaox

    Oct 19, 2016
    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: Dec 4, 2018
Loading...