Graphene Themes Forum

Graphene Themes Forum

Community support for Graphene themes

  • Home
  • Register
    • Reset password
  • Contact Us

Home › Forums › Graphene WordPress theme › Support

how to add a facebook icon next to rss icon at the top of theme

  • Admin

    Syahir Hakim

    February 22, 2011 at 2:44 am #11436

    Did you put the codes in the theme’s functions.php or your child theme’s functions.php?

    bosoxbrent

    February 23, 2011 at 1:54 am #11437

    Hi Syahir,

    I tried putting the code in the theme’s function.php (that is where I had it before the update), but when I did the update it wrote over it. That’s fine. So I read up on the topic and realize that I need to create a child theme functions.php file so this won’t happen again. So I just did that, along with having a style.css file since I read that you have to have a style.css file in any child. No problem.

    Now I’m trying to use the code that Andrewjs18 wrote a few months back. I had this code in the theme’s functions.php before and it seemed to work just fine. If I remember right, I placed it near some coded that had to do with the RSS feed and it put some buttons on the top of the page for me.

    This is the code that I used after inputting my own settings.

    <?php
    function graphene_social_icons(){ ?>
    <a href="http://www.facebook.com/group.php?gid=246817092236" title="Visit the CSI Homebrew Club on Facebook"><img src="http://csibrewers.org/content/wp-content/uploads/2010/12/facebook.png"></a>
    <a href="http://www.twitter.com/csibrewers" title="Visit the CSI Homebrew Club on Twitter"><img src="http://csibrewers.org/content/wp-content/uploads/2011/02/twitter.png"></a>
    <a href="https://spreadsheets.google.com/viewform?formkey=dDVMdXhSaDc4MnNkYzQ4ZTRNa2lyNmc6MQ" title="Join the CSI e-mail list"><img src="http://csibrewers.org/content/wp-content/uploads/2011/02/email.png"></a>
    <?php
    }
    add_action('graphene_feed_icon','graphene_social_icons');
    ?>

    So the question is “is this coded still applicable with the new version of Graphene and if so, where should I put it?

    Right now in my “graphene-child” folder I have a style.css file that I have done some minor look and feel changes to the code. That seems to be ok. Also in that folder I have a copy of theme’s functions.php that I have copied over from the “graphene” folder. This is untouched.

    Any help you could profile would be awesome!!!

    Thanks so much,

    Brent

    Admin

    Syahir Hakim

    February 23, 2011 at 3:28 am #11438

    It should be working with the new update. Also, do not copy the theme’s functions.php file into the child theme’s folder. Create an empty functions.php file, and add codes there as necessary.

    inaz4sun

    February 23, 2011 at 5:38 pm #11439

    So what does the “social sharing button” area of the setup actually do? Seems like the purpose is to drop in your code and have your button/link show up in the top bar next to the RSS button, right? Is that not the functionality. I can certain hard code this in, but if this works that is certainly a better way to go.

    Admin

    Syahir Hakim

    February 23, 2011 at 6:04 pm #11440

    The “social sharing button” option in the theme’s options page is for the post’s sharing buttons, not the site’s. If enabled and the codes added, the social sharing buttons will be displayed at the bottom right of the post.

    What is being discussed in this thread is how to add additional icons and links to the top of the theme, where the RSS button is located. There’s no options for that, so it has to be coded in using a child theme.

    inaz4sun

    February 23, 2011 at 7:53 pm #11441

    Thanks for clarifying, its not really clear in theme setup what that does and where it goes, maybe just a description line added there would help.

    As for the top bar, it would be a great addition to the theme to add a way to add these in the setup (like above) and have them appear next to the RSS icon. I want to do this so I guess I’ll just hard code that in.

    Maybe as a suggestion for development, have a setup area just for that top bar which asks:

    Include RSS icon?

    Include additional social icons:

    Enter code for 1 or more here…

    Include search box

    Additional HTML:

    Enter code here.

    That would be cool. Great theme BTW.

    schmidtysays

    February 24, 2011 at 1:46 am #11442

    I just edited the CSS file for the header for http://schmidtysays.com

    I replaced the <div id=”rss”> with these piece of code:

    <div id="rss">
    <a href="http://schmidtysays.com/feed/" title="Subscribe to RSS feed"><span>Subscribe to RSS feed</span></a>
    <a href="http://twitter.com/schmidtysays" title="Visit my Twitter Page"><span>Visit my Twitter Page</span><img src="http://schmidtysays.com/wp-content/Images/twitter.png" alt="My Twitter Page" /></a>

    <a href="http://facebook.com/schmidtysays" title="Visit my Facebook Page"><span>Visit my Facebook Page</span><img src="http://schmidtysays.com/wp-content/Images/facebook.png" alt="My Facebook Page" /></a>

    <a href="http://youtube.com/classysexybitch" title="Visit my YouTube Page"><span>Visit my YouTube Page</span><img src="http://schmidtysays.com/wp-content/Images/youtube.png" alt="My YouTube Page" /></a>

    <a href="http://www.flickr.com/photos/schmidtysays/" title="Visit my Flickr Page"><span>Visit my Flickr Page</span><img src="http://schmidtysays.com/wp-content/Images/flickr.png" alt="My Flickr Page" /></a>

    <a href="mailto:me@schmidtysays.com" title="Send me an Email"><span>Send me an Email</span><img src="http://schmidtysays.com/wp-content/Images/email.png" alt="Send me an Email" /></a>

    </div>

    bosoxbrent

    February 24, 2011 at 5:35 pm #11443

    Thanks Syahir…I think I was just getting in a little over my head with trying to spin up on the child themes and how they work. I need to learn a little more about WordPress and PHP coding before I should head down that road.

    I’ve gone ahead and done what schmidtysays did with her site. This worked out great and I was able to restore the code. I should have thought of doing this in the beginning, but then again I’m still learning.

    Thanks for the help and for creating the best theme out there!!!

    -Brent

    Kim

    February 24, 2011 at 11:54 pm #11444

    Graphene Child:(functions.php)

    <?php
    function graphene_social_icons(){ ?>
    <a href="http://www.yoursite/?page_id=861" title="Send message"><img src="http://www.yoursite/wp-content/uploads/m-4.png" /></a>
    <a target="_new" href="https://forum.graphene-theme.com/" title="Graphene theme Forum"><img src="http://www.yoursite/wp-content/uploads/web1.png" /></a>
    <?php
    }
    add_action('graphene_feed_icon', 'graphene_social_icons');
    ?>

    Graphene Child: Stylesheet (style.css)

    #rss a{
    margin-left:10px;
    }
    #rss a.rss_link{
    margin-left:23px;
    }

    This works for me.

    You can use or add any link and 29px picture u like.

    Kim

Viewing 9 posts - 31 through 39 (of 39 total)

  • 1
  • 2
  • 3
  • 4
  • You must be logged in to reply to this topic.
Log In

Account

Log In
Register Lost Password

Search Forums

Priority Support

This free Support Forum relies on contributions from our support staffs and fellow Graphene themes users. While we endeavour to provide adequate and timely support, due to its voluntary nature responses are not guaranteed and may be delayed.

If you require urgent assistance, you may like to consider our Priority Support option.

Get Priority Support

Forums

  • Graphene WordPress theme
  • Graphene Mobile
  • Graphene Mobile Neo
  • Franz Josef

Recent Topics

  • The photo of my article is loading in the banner??
    12 months ago
  • need the original standard right sidebar back
    1 year ago
  • Hiding Child Listings only on Specific Pages?
    1 year ago
  • Is it possible to move the Comments counter?
    1 year ago
  • Image Size on Slider in home page
    1 year ago

Made with by Graphene Themes.