Viewing 5 replies - 1 through 5 (of 5 total)
  • Just put in functions.php:

    function dequeue_yoast_css() {
      wp_dequeue_style('yoast-seo-adminbar');
      wp_deregister_style('yoast-seo-adminbar');
    }
    add_action('wp_enqueue_scripts','dequeue_yoast_css');
    Thread Starter Nadeem Khan

    (@chillopedia)

    Thanks it worked.

    Awesome…
    here is my entire block o’ hax in case anybody needs ’em


    function mytheme_admin_bar_render() {
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu('wpseo-menu');
    }
    add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
    add_filter( 'wpseo_use_page_analysis', '__return_false' );

    function my_custom_css() {
    echo '<style>
    .misc-pub-section.yoast-seo-score.content-score { display: none; }
    .misc-pub-section.yoast-seo-score.keyword-score { display: none; }
    </style>';
    }
    add_action( 'admin_head', 'my_custom_css' );

    function dequeue_yoast_css() {
    wp_dequeue_style('yoast-seo-adminbar');
    wp_deregister_style('yoast-seo-adminbar');
    }
    add_action('wp_enqueue_scripts','dequeue_yoast_css');

    Sorry, but does it change on your website ?

    Just looking to increase mine …

    eaglejohn

    (@danielbenjamins)

    Why do we have to keep editing our functions.php or apply other hacks to get rid of the useless and annoying crap we get with every update?!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Why is this useless css file being loaded in the frontend?’ is closed to new replies.