This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
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  

    17,441
    738
    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 Bigg Boss Child

    10
    0
    Mar 10, 2017

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

    Apanha Admin Staff Member  

    17,441
    738
    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 Bigg Boss Child

    10
    0
    Mar 10, 2017
    Cheers!
     
Loading...
Tags: