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

0

By VarHowto Editor

Welcome to VarHowto!

1 reply on “How to remove the SVG content added by Jetpack in WordPress”

you are the boss it is a really helpful article. I had visited many websites but you arricle really helps me.

0

Comments are closed.