Support » Theme: Twenty Twenty-One » Twenty Twenty-One custom social icon in plugin

  • Resolved ArtGoddess

    (@artgoddess)


    Hi there,

    Using the “Twenty Twenty-One” theme, I would like to set up the Discord SVG icon, in a custom plugin.

    SVG: https://discord.com/branding

    I’m trying with this code:

    function Custom_twenty_twenty_one_social_icons_map( $icons ) {
        $icons['discord'] = array(
            'discord.com',
        );     
        return $icons;
    }
    
    add_filter( 'twenty_twenty_one_social_icons_map', 'Custom_twenty_twenty_one_social_icons_map' );
    
    function Custom_twenty_twenty_one_svg_icons_social( $icons ) {
    
        $icons['discord'] = '<svg>  ...  </svg>';
    
        return $icons;
    }
    
    add_filter( 'twenty_twenty_one_svg_icons_social', 'Custom_twenty_twenty_one_svg_icons_social' );

    It works in the footer, but it doesn’t work with the Gutenberg “social icon” block in the content.

    Footer
    Content

    Is there any way to replace the standard icon with the Discord icon inside the content?

    Issue also posted here, will mark as solved both threads. Many thanks.

    https://wordpress.org/support/topic/discord-icon-on-social-icons-block/

    • This topic was modified 8 months, 1 week ago by ArtGoddess.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator jordesign

    (@jordesign)

    Hey @artgoddess – in terms of the icons in the Gutenberg Social Icons block – that will be unrelated to the theme in use. So there’s nothing specific I can suggest in relation to that.

    That being the case – your other forum post (which you linked to) is probably going to be the best place to find a solution. Because of that we would love if you would mark this topic as resolved in the sidebar. This helps our volunteers find the topics that still need attention and more people will get helped, possibly like you did.

    Thread Starter ArtGoddess

    (@artgoddess)

    So then, this thread should be marked as solved, as:

    Icons in the Gutenberg Social Icons block are unrelated to the theme in use. 

    Many thanks for answering and guiding me to the correct forum.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Twenty Twenty-One custom social icon in plugin’ is closed to new replies.