[Resolved] lightweight social icons using generate_inside_navigation hook

Home Forums Support [Resolved] lightweight social icons using generate_inside_navigation hook

Home Forums Support lightweight social icons using generate_inside_navigation hook

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #473361
    Marcus

    Is there a way to use the “lightweight social icons” plugin inside of the global navigation? I was assuming it might involve the generate_inside_navigation hook?

    I’m trying to have: [LOGO (left)] —— [Navigation + Lightweight Social Icons (right)]

    Essentially all on one line in the header, logo left; navigation and lightweight social icons right.

    Thank you!

    #473606
    Leo
    Staff
    Customer Support

    Hi there,

    Using FontAwesome should be a better method: https://docs.generatepress.com/article/adding-icons-to-menu-items/

    #473617
    Marcus

    Thank you! I actually had looked at that technique you linked to earlier today, but wanted to take advantage of the ease of use of lightweight social icons plugin instead if possible.

    #473694
    Leo
    Staff
    Customer Support

    That would actually complicate things which is why we’ve written that article ๐Ÿ™‚

    It should be relatively easy if you follow the steps but definitely let me know if you get stuck somewhere.

    #474263
    Marcus

    I was able to add the shortcode via the Widget Shortcode plugin and this hook:

    add_action( 'generate_inside_navigation','addnavshortcode' );
    function addnavshortcode() {
    echo do_shortcode( '[widget id="lsi_widget-2"]' );
    }
    ?>

    However, the icons appear above the navigation and not to the right side as I hoped they would. I guess some CSS is in order?

    #474412
    Leo
    Staff
    Customer Support

    Hmm try wrapping it in a div with a class then use CSS to float: right;

    #474431
    Marcus

    Thank you for the help Leo. I think the float right will work if I can figure out how to make the container a little wider? So close!

    2018-01-18_15-57-18.png

    #474523
    Leo
    Staff
    Customer Support

    The site container? Should be here: https://docs.generatepress.com/article/container-width/

    #474544
    Marcus

    No, it looks like the “nav#site-navigation.main-navigation” is what is too narrow. It’s causing the last link, “CONTACT”, to be pushed down. Wondering if that container could extend out more to the left to make room for the social icons.

    2018-01-18_19-08-41.png

    Thank you for all the help Leo!

    #474550
    Leo
    Staff
    Customer Support

    Can you link me to the page?

    #474587
    Marcus

    I have this running locally via Flywheel right now, but this live link should let you take a look.

    http://7af15c0f.ngrok.io/

    Thank you Leo!

    #474645
    Tom
    Lead Developer
    Lead Developer

    Try adding this CSS:

    #primary-menu {
        float: left;
    }
    #474812
    Marcus

    Brilliant! Yes, that’s what I needed!

    Thank you Tom!
    Thank you Leo!

    #475098
    Tom
    Lead Developer
    Lead Developer

    Glad we could help ๐Ÿ™‚

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