Categories
WordPress

How to remove the SVG content added by Jetpack in WordPress

Once jetpack is activated, it will append the whole SVG file to your html. This increases the size of your HTML, slowing down your website.

The problem is that even if you don’t use any of Jetpack’s social features, it will still append the file content.

How to remove

Add the following code to the functions.php file in your theme.

add_action( 'init', 'remove_jetpack_social_menu_include_svg_icons');

function remove_jetpack_social_menu_include_svg_icons() {
	remove_action( 'wp_footer', 'jetpack_social_menu_include_svg_icons', 9999 );
}

When not to remove

If you used any of its “Sharing” features below, do not adding the code above. Otherwise, you won’t see the social icons.

  • Publicize connections
  • Sharing buttons
  • Like buttons

Like

By VarHowto Editor

Welcome to VarHowto!

Leave a Reply

Your email address will not be published. Required fields are marked *