[Support request] Putting social media icons in header

Home Forums Support [Support request] Putting social media icons in header

Home Forums Support Putting social media icons in header

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1159204
    HEATHER

    Hi can anybody walk me through putting my social media icons in the top right section of my header? Thank you.

    #1159207
    Leo
    Staff
    Customer Support

    Hi there,

    Try Lightweight social icons in the header widget area:
    https://en-ca.wordpress.org/plugins/lightweight-social-icons/
    https://docs.generatepress.com/article/header-widget/

    Let me know if this helps ๐Ÿ™‚

    #2288384
    melonbird

    This doesn’t work if you have “Use Navigation as Header” checked. Is there an alternative method that would display it inline on desktop and in the mobile menu under the normal menu? Or a way to add them to the normal menu?

    #2288446
    David
    Staff
    Customer Support

    Hi there,

    for it to appear as part of the normal mobile dropdown menu then the icons would have to be added as items in your menu.
    The Navigation Label in a menu item does support HTML.

    #2290532
    melonbird

    I tried adding a Custom Label to the menu with the HTML from source code from the Lightweight Social Icons plugin copied into the Navigation label. Nothing is showing.

    #2290537
    David
    Staff
    Customer Support

    Can you share a link to the site ?

    #2290756
    melonbird

    Not able to, sorry.

    #2290791
    David
    Staff
    Customer Support

    OK, see this doc:

    https://docs.generatepress.com/article/adding-icons-to-menu-items/

    theres a link at the top for a plugin that does it for you

    #2290958
    melonbird

    Thanks. I already looked at these, but both involve adding Font Awesome, which adds weight to the page. Lightweight Social Icons adds a font which Google Pagespeed dings me for on speed. I really just want to add some simple, small icons with links, which I can do as a widget but can’t figure out how to add to the menu. I guess this is a WP issue and a not a GeneratePress issue, though, so I’ll look somewhere else for a solution.

    I also tried to do this with Generate Blocks, but couldn’t get it to show up inside the menu rather than in the menu bar.

    #2290986
    Ying
    Staff
    Customer Support

    I tried adding a Custom Label to the menu with the HTML from source code from the Lightweight Social Icons plugin copied into the Navigation label. Nothing is showing.

    SVG code didn’t work in navigation label field, but it seems working now, I just tested on my testing site.

    Can you share the source code you entered?

    #2291248
    melonbird

    Okay wait. While I was responding to Ying, I realized a mistake I made and fixed that. So now I’ve got them showing in the menu now using the code from Lightweight Social. The only problem is that I’d love them to be in a horizontal row in the mobile menu like they are on desktop. Can that be done with CSS without changing the desktop display?

    Screenshot of mobile menu with social icons stacking line by line

    #2291537
    David
    Staff
    Customer Support

    Try adding this CSS:

    @media(max-width: 768px) {
        .mobile-menu-open .main-nav>ul {
            display: flex !important;
        }
    
        .main-nav>ul>li.menu-icon {
            flex: 0 1 60px;
        }
    }

    then give each of the icon menu items a CSS class of menu-icon

    https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes

    #2291610
    melonbird

    Oh wow – perfect! Thanks for sticking with me on this.

    #2291846
    David
    Staff
    Customer Support

    Awesome – glad to hear that worked ๐Ÿ™‚

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.