Jump to content
dawsonbarber

How To Make Social Icons "Portable"

Recommended Posts

dawsonbarber+    19
dawsonbarber

Not sure if this is appropriate or not, but I thought it might be useful to some members so I'm sharing it here.

The default social icons that come with the PageLines branding section look and "feel" (on hover) great. The only thing I wasn't crazy about was that I didn't want them in the header. I wanted them in the footer.

So I did a little bit of fiddling around and managed to find a way to make them somewhat portable and, at the same time, retain the nice hover behaviour.


<section class="section-branding"><div class="texture"><div class="content"><div class="content-pad"><div class="branding_wrap fix"><div class="icons" style="bottom: 12px; right: 1px;"><a target="_blank" href="http://YOURURL.com/feed/" class="rsslink"><img src="http://YOURURL.com/wp-content/themes/pagelines/sections/branding/rss.png" alt="RSS"/></a><a target="_blank" href="http://twitter.com/YOURTWITTERID" class="twitterlink"><img src="http://YOURURL.com/wp-content/themes/pagelines/sections/branding/twitter.png" alt="Twitter"/></a><a target="_blank" href="http://facebook.com/YOURFACEBOOKPAGEURL" class="facebooklink"><img src="http://YOURURL.com/wp-content/themes/pagelines/sections/branding/facebook.png" alt="Facebook"/></a><a target="_blank" href="http://linkedin.com/YOURLINKEDINID" class="linkedinlink"><img src="http://YOURURL.com/wp-content/themes/pagelines/sections/branding/linkedin.png" alt="LinkedIn"/></a><a target="_blank" href="http://youtube.com/YOURYOUTUBEID" class="youtubelink"><img src="http://YOURURL.com/wp-content/themes/pagelines/sections/branding/youtube.png" alt="Youtube"/></a><a target="_blank" href="https://plus.google.com/YOURGOOGLEPLUSID" class="gpluslink"><img src="http://YOURURL.com/wp-content/themes/pagelines/sections/branding/google.png" alt="Google+"/></a></div></div>

<script type="text/javascript">

jQuery('.icons a').hover(function(){ jQuery(this).fadeTo('fast', 1); },function(){ jQuery(this).fadeTo('fast', 0.5);});

</script>

Just copy and paste the code above into a footer widget (it also appears to work in sidebar widgets) and you'll have those beautiful social icons - with that great hover effect - in your footer. Obviously, in the code above, you'll need to replace YOURURL with the actual URL for your site. You'll also need to replace YOURTWITTERID, YOURFACEBOOKPAGEURL, and other social profile links with your own. If you didn't want to use one of the social icons, then simply select and delete the code for it between the opening <a and closing </a> tags. Note: you may have to add/modify some CSS in order to make them display exactly how you want them to - e.g. I added the following CSS (to remove the absolute positioning and to center-align the icons inside the footer widget):

.section-branding .icons {

position: static;

width: 192px;

margin-left: auto;

margin-right: auto;

}

Depending on the number of icons you use, you'll need to adjust the width accordingly (I'm using six, for which 192px seems to be correct).

Anyway, hope this is useful.

  • Like 1

Share this post


Link to post
Share on other sites
mackenzie    12
mackenzie

Thank you for taking the time to write this out and share :)

  • Like 1

Mackenzie - PageLines Help Desk

The Centsible Family - Writer, Photographer and Coffee Addict

---------------------------------------------------

Kindly search this forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

Share this post


Link to post
Share on other sites
dawsonbarber+    19
dawsonbarber

No worries, Mackenzie.

Share this post


Link to post
Share on other sites
pehja+    12
pehja

:D


Professionell musician | Webbdesigner | Apple freak

Pehja Production.png

Share this post


Link to post
Share on other sites
jimraffel    0
jimraffel

First of all this is great and I have it almost working, but I'm wondering if there is a typo in the code above?

 

I've installed this at: http://businesstravelexclusive.zippysites.com/

 

You'll notice I'm getting:

 

icons" style="bottom: 12px; right: 1px;">

 

displaying before the icons.

 

I am using this in a universal sidebar installed in the header so maybe that is my problem?

 

I'm not much of a CSS coder but I also notices only two closing </div> and five opening <div> as well as no closing </section>

 

Any help would be greatly appreciated!

 

Thanks again for coming up with this if I can get it to work it's a perfect solution to our current need.

 

Jim :)

Share this post


Link to post
Share on other sites
James B    436
James B

Hi Jim, I'm assuming you've resolved this as I can no longer see the code appearing on your site before the icons.

 

http://screencast.com/t/E64hSIVwHMK


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • Anthony CALCI
      By Anthony CALCI+
      Hello,
      I have switched from the Framwork theme to DMS theme on http://calcipatrimoine.theproofingcompany.fr (miror site of http://calci-patrimoine.com).
      But I have now only the Primary sidebar in the Widget section ! Secondary sidear, Footer sidebar have all disapear...
      Can I have help to have them back ?
      Regards,
      Anthony
    • MissT
      By MissT+
      The social icons within the Sitemap Footer section plugin are not longer showing on screen. Site details will be sent via email separately.
      WordPress - 4.7.2
      Pagelines Framework Version 5.0.97
      Platform 5 Version - 5.1.6
      Section Sitemap Footer version - 5.0.4.
       
      All other plugins deactivated.
    • colleenc
      By colleenc+
      I am having an issue with the size of the font in a text box widget on my sidebar. It has me completely baffled because I have two text widgets on my sidebar and the other one is displaying perfectly. 
      The sole difference between the two is the amount of text in the widget, but that can't be the problem.
      My site is: loveandnudes.com and the text widgets are on the right side at the top. 
      I have duplicated the one with the issue and I am fiddling with it right now to see if I can find a solution. But I would love any suggestions. I though CSS would do the trick, but either I tried the wrong thing - or I put it into the wrong place.
      Thanks for your help!
    • Houston Haynes
      By Houston Haynes+
      OK - folks - back with another nit... The "back to top" link works - BUT - it's only active (i.e. clickable with the associated action following) when the mouse-over hovers over the footer area of the page. I did a quick change of the z-depth (to -1) and nothing made a difference. Any thoughts on how to make the *entire* back-to-top icon hover-able/actionable? Thanks!
       

    • romanondrasek
      By romanondrasek
      hi all, I have some trouble using PL5 on my site. 
      I used plugins for event calendar (event on) and plugin (timetable responsive scheduler for WP) for schedule (classes) in the gym.
      The problem is, that post from this 2 plugins are shown without menu in header and footer. (I setup header and footer) in the page editor for all type of page. 
      When I create a lesson, it creates posts with slug (I have a slug "lekce" & event for events).
      I try to edit the post with PL editor, but editor is not opening on the post.

      Do you have some idea where should be some problem? Thanx so much.
      here are links for the sites :
      site with schedule :
      http://www.myfit.cz/rozvrh/
      site of one of the class (pilates)
      http://www.myfit.cz/lekce/pilates/
      site with calendar :
      http://www.myfit.cz/kalendar/
      7 side with one event from the calendar :
      http://www.myfit.cz/event/pilates-instruktor-akreditovana-licence/?ri=1
      when I have my site on DMS2 it was working :-(
       
       
×