Social Media Icons – How do I add them into the header, not a sidebar widget?

Home Forums Storm WordPress Social Media Icons – How do I add them into the header, not a sidebar widget?

This topic is: resolved
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #9622
    giorgioecf
    Participant

    HI, I’m trying to add basic facebook/twitter icons into the top right corner of my site, up in the header, past the menu. Seems like it’d be an easy thing to do, but I cannot figure it out. I did try out the social icons widget, but that’s not working for us at all – it only comes in a side bar, and we’re not using any side bars for our pages, just full width. I’d appreciate your help on this, thank you!

    #9640
    giorgioecf
    Participant

    Guys – anyone? Anyone?

    #9644
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #9657
    giorgioecf
    Participant

    O excellent – thank you, I will try this šŸ™‚

    #9660
    giorgioecf
    Participant

    Ok, after posting to Theme functions php file, I get this:

    Parse error: syntax error, unexpected ‘?’ in /hermes/bosoraweb077/b945/ipg.invisibleescalatorsc/tntg/wp-content/themes/storm/functions.php on line 10

    #9662
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    • This reply was modified 10 years ago by Ally.
    #9685
    giorgioecf
    Participant

    Ok Ally, thank you for clarifying – yes for whatever reason email came in wrong. I used the code from here, and it worked – sort of. Here’re 2 bad things happening with my new code below, with actual links:
    1. The scrolling becomes impossible with the whole page jumping/jittering up and down with any mouse movement; I’ve adjusted the icon size and location, pretty much in the ideal spot, thank you. But the scrolling bug makes the experience impossible

    2. Even though the code clearly has 2 different urls connecting to our facebook and twitter pages, both of the icons in the code point to facebook’s url only. I.e. no matter what, twitter icon seems to ignore the correct url in the code.

    ——————————
    function my_social_icons()
    {
    ?>
    <div class="my-social-icons">
    <a href="https://www.facebook.com/TheNeedToGrow"><img src="http://theneedtogrow.com/wp-content/uploads/2014/04/1398242835_ft.png" /></a>
    <a href="https://twitter.com/TheNeedToGrow"><img src="http://theneedtogrow.com/wp-content/uploads/2014/04/1398242827_tt.png" /></a>
    </div>
    <?php
    }
    add_action('tcr_header', 'my_social_icons', 11);

    ——————————————–

    • This reply was modified 10 years ago by Ally. Reason: Added code tags
    #9686
    giorgioecf
    Participant

    Ok that’s weird – the code i posted above just acted on this page and turned it into actual icons here. Is it supposed to do that?

    #9694
    giorgioecf
    Participant

    So what’s the solution to the scrolling and linkage bugs?

    #9700
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #9719
    giorgioecf
    Participant

    Ok, so after turning the sticky header off, the jittering went away, BUT – I highly prefer if I could have the header stay in one place despite scrolling. The second problem with the icons still persists, and its really puzzling me – it’s a simple link, one goes to facebook, other goes to twitter, and clearly they’re there in the code, but both icons still go to facebook only. Here’s my code again:


    function my_social_icons()
    {
    ?>
    <div class="my-social-icons">


    </div>
    <?php
    }
    add_action('tcr_header', 'my_social_icons', 11);

    #9720
    giorgioecf
    Participant

    Ok, apparently putting it in tags didn’t work again either. I’ll just email you the code now.

    #9721
    giorgioecf
    Participant

    Ok Ally – TIME OUT! Lol I just resolved the WHOLE thing, both the jittering and weird linkage – it was the stupid garbage at the end of my links that somehow stayed over the wrong email code. How annoying is that. Finally got a clue that it should just be closed with a standard tag and now works perfect – thank you!

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.
Be inspired. Ā© 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy