skip to Main Content

How to remove front svg in wordpress 5.9 version

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 0 0" width="0" height="0" focusable="false" role="none" style="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"><defs><filter id="wp-duotone-dark-grayscale"><feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix><feComponentTransfer color-interpolation-filters="sRGB"><feFuncR type="table" tableValues="0 0.49803921568627"></feFuncR><feFuncG type="table" tableValues="0 0.49803921568627"></feFuncG><feFuncB type="table" tableValues="0 0.49803921568627"></feFuncB><feFuncA type="table" tableValues="1 1"></feFuncA></feComponentTransfer><feComposite in2="SourceGraphic" operator="in"></feComposite></filter></defs></svg>

2

Answers


  1. Chosen as BEST ANSWER

    I found a way, it works! https://github.com/WordPress/gutenberg/issues/36834#issuecomment-1048923664

    remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
    remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
    

  2. 5.9 have added some extra global styles in <head> . You can disable them if you don’t want by adding this code snippet.

    add_action(wp_enqueue_scripts','remove_my_global_styles');
    function remove_my_global_styles() {wp_dequeue_style('global-styles');
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search