Support » Theme: Twenty Seventeen » Remove the social svg files from twentyseventeen

  • Hello!

    How can I get rid of the

    <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <defs>
    <symbol id="icon-behance" viewBox="0 0 37 32">
    <path class="path1" d="M33 6.054h-9.125v2.214 [...]"></path>
    </symbol>
    <symbol id="icon-facebook" viewBox="0 0 19 32">
    <path class="path1" d="M17.125 0.214v4.714h [...]"></path>
    </symbol>
    [...]

    things at the very end of the website? I don’t need the social media bar and therefore these code lines are just junk and probably increasing the loading time of the website.

    The footer.php of my child themes looks like this:

    </div><!-- #content -->
    </div><!-- .site-content-contain -->
    </div><!-- #page -->
    <?php wp_footer(); ?>
    </body>
    </html>

    I have also tried the following in my functions.php file:
    remove_action( 'wp_footer', 'childtheme_include_svg_icons', 99999 );

    Unfortunately nothing works.
    I have searched the internet for hours but was not able to find anything that works.

    Thanks and best regards!

    • This topic was modified 3 years, 5 months ago by Eastburn.
    • This topic was modified 3 years, 5 months ago by Eastburn.
Viewing 1 replies (of 1 total)
  • Update: I only wanted to remove the social media related svg items. It seems that this would only possible by deleting the corresponding lines in /wp-content/themes/twentyseventeen/assets/images/svg-icons.svg.
    At least I was not able to find a hook that makes it possible to only filter out all social svgs.

    remove_action( 'wp_footer', 'childtheme_include_svg_icons', 99999 );
    would filter out all svg items, which I don’t want.

    Does anybody have another idea that works without directly manipulating the files of the theme?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • The topic ‘Remove the social svg files from twentyseventeen’ is closed to new replies.