Share this code on home page only in menu bar?

  • raindance

    #1888

    Is there a way to make the social sharing buttons show up on the secondary menu bar ONLY on the home page?

    So this is my code:

    <!– standard button–>

    <span class=”st_fblike_hcount” ></span>

    <span class=”st_facebook”></span>

    <span class=”st_twitter”></span>

    <span class=”st_linkedin”></span>

    <span class=”st_stumbleupon”></span>

    <span class=”st_email” ></span>

    <span class=”st_sharethis”></span>

    <script type=”text/javascript” src=”http://w.sharethis.com/button/buttons.js”></script&gt;

    <script type=”text/javascript”>

    stLight.options({

    publisher:’wp.48f508c4-0b75-4c89-a79f-1d00814f82e7′

    });

    </script>

    I want it to appear to the far right of the About Laura / juicyhotels.com menu items on the secondary menu bar. How would I do this? I don’t want it in that spot on any page other than the home page.

    Thanks in advance!

    Laura

    Anonymous

    #17532

    WOW!! That site looks great!

    Lemme ask while I’m playing around on it… what did you use as the slider for your images in the page? I’m assuming the top slider and the slider on the page are using the same plugin?

    It looks great. I wanna use it… lol

    raindance

    #17533

    Thanks!

    I’m just using the Graphene slider…I made a category and assigned those to the home slider category. I haven’t played with it in awhile though so I can’t remember now if I modified it. I know in one of my themed sites, the other being lauravanhoff.com, I installed a plug in for excerpts and this relates to the slider. But I think in Graphene I’m just using the basic slider functions that came with it, controlled in the Graphene Options panel.

    I’ll be working with those home page sliders over the next few days so once I get my brain back in that gear I’ll let you know if it’s different than that.

    Mod

    Kenneth John Odle

    #17534

    You could try pasting the code into a header widget and then adjusting the position using some custom CSS.

    Keep in mind, though, that social sharing buttons create a link directly to the page someone is clicking from, and this will appear on all of your pages. So if someone is on your front page and clicks on a social sharing button, that will create a link to your front page, and not to any of your posts in particular.

    Ken

    raindance

    #17535

    I don’t know what a header widget is…?

    I don’t want it on all pages…I just want it on the home page. All the other pages have it by virtue of my having selected show on pages, but, it doesn’t show up on the home page. There must be some way to get it just on the home page where I want it? Like in the index page file or theme file or functions file?

    Mod

    Kenneth John Odle

    #17536

    Sorry, I misread that. Front page only…hmmmm.

    You might be able to do this using the is_home() function attached to an action hook that would echo your code. But not sure.

    raindance

    #17537

    Hmmm…ok…don’t know where to go with that…good start…

    Anyone else have any input how to do this please? 🙂

    Admin

    Syahir Hakim

    #17538

    Easiest would be to just use the Header Widget Area, put a text widget inside that widget area, and then put the code inside that text widget. Then you can use the Widget Logic plugin so that you can configure that text widget to only be shown on the home page.

    raindance

    #17539

    Thanks Syahir…ok are these the right steps?

    1. I activated the widget logic plug in.

    2. In the WP dashboard I’m in Appearance > Graphene Options > Widget Area Options > I checked enable header widget area

    3. Now in Appearance > Widgets is a new “Header Widget” box

    4. I dragged a text box from the middle to the header widget box on the right.

    5. I pasted in my share this code:

    <span class=”st_fblike_hcount” ></span>

    <span class=”st_facebook”></span>

    <span class=”st_twitter”></span>

    <span class=”st_linkedin”></span>

    <span class=”st_stumbleupon”></span>

    <span class=”st_email” ></span>

    <span class=”st_sharethis”></span>

    <script type=”text/javascript” src=”http://w.sharethis.com/button/buttons.js”></script&gt;

    <script type=”text/javascript”>

    stLight.options({

    publisher:’wp.48f508c4-0b75-4c89-a79f-1d00814f82e7′

    });

    </script>

    5. There is a widget logic box there at the bottom which is blank. Not sure what to put there?

    6. And now I see the icons there on the home page, yeay, but they are up in the top left. So the remaining questions are:

    1. How do I get them to be where I want them, on that secondary menu bar to the right of About Laura and Juicy Hotels (far right edge of that bar)

    2. How do I tell it to appear on the home page only?

    THANK YOU!

    raindance

    #17540

    Weird…now when I go back to the widget page > header widget box on the right side, it doesn’t show the text box I added there? But the share this icons are still showing up on the page. Why is the text box not showing in the header widget area for me to make adjustments? I thought maybe if I add the is_home() to the “widget icon” field it would make it only show on the home page? But the text box isn’t there to make that change.

Viewing 10 posts - 1 through 10 (of 18 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.