Home › Forums › Storm WordPress › Social Media Icons – How do I add them into the header, not a sidebar widget?
- This topic has 12 replies, 2 voices, and was last updated 10 years, 8 months ago by giorgioecf.
- AuthorPosts
- April 17, 2014 at 5:57 am #9622giorgioecfParticipant
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!
April 20, 2014 at 4:08 am #9640giorgioecfParticipantGuys – anyone? Anyone?
April 21, 2014 at 9:53 am #9644AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 21, 2014 at 5:36 pm #9657giorgioecfParticipantO excellent – thank you, I will try this 🙂
April 22, 2014 at 7:57 am #9660giorgioecfParticipantOk, 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
April 22, 2014 at 8:24 am #9662AllySupport StaffYou 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, 8 months ago by Ally.
April 23, 2014 at 5:29 am #9685giorgioecfParticipantOk 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 impossible2. 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, 8 months ago by Ally. Reason: Added code tags
April 23, 2014 at 5:30 am #9686giorgioecfParticipantOk 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?
April 25, 2014 at 6:12 am #9694giorgioecfParticipantSo what’s the solution to the scrolling and linkage bugs?
April 25, 2014 at 2:47 pm #9700AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 26, 2014 at 5:01 pm #9719giorgioecfParticipantOk, 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);
April 26, 2014 at 5:02 pm #9720giorgioecfParticipantOk, apparently putting it in
April 26, 2014 at 5:11 pm #9721giorgioecfParticipantOk 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!
- AuthorPosts
- You must be logged in to reply to this topic.