Floating of Sharethis Buttons
-
The Sharethis buttons on http://palomboforcongress are set up to float right. When the buttons display at the bottom, they display neatly beneath a line after the post. However, when they display at the top, the text of the post wraps around the buttons. What code can I put in my child style.css file to prevent the wrap? I would like to have the buttons on their own line and the post start on the next line.
Also, if I select to display the buttons at the top, they do show on the front page of the website but if I select to display them at the bottom, they do not show on the front page. I would really like to have them at the bottom but to appear on the front page.
ModThis post
http://blog.kjodle.net/2011/11/04/graphene-action-hook-widgets-an-easy-way-to-modify-your-blog/
may be just what you need.
ModNope. The code is linked to the page on which the buttons appear. That’s not a theme issue, but a sharing button issue–they want the count to reflect the page the button is appearing on. That’s another reason I don’t want my sharing buttons to show up on the front page.
Moduse
is_singular
to make this appear on both posts and pages.That should leave them off the home page, unless you are using a static front page. If so, use a PHP “not” operator:
if !(is_home())
should work, but not tested, no guarantees, YMMV.
If it doesn’t, try peeking here for some variations:
http://codex.wordpress.org/Conditional_Tags#The_Conditions_For_…
AdminIf you’re using AddThis, their API allows you to explicitly define the URL, Title, and Description of the page the buttons are sharing, regardless of on which page the button is placed.
See this:
ModIf you’re using AddThis, their API allows you to explicitly define the URL, Title, and Description of the page the buttons are sharing, regardless of on which page the button is placed.
I did not know this–thanks, Syahir. Yet another reason to use AddThis.
I may just have to switch to AddThis.
Yes, because now it rocks even more.
Is there any way to omit the sharing buttons from a particular post either using Graphene Options or the Action Hook widget?
Well, sure. Remember that everything on WP gets its own unique ID. So if you look at this page on my blog:
and either view source or use Firebug, you’ll notice that its content area is identified as
id="post-1096"
.So I can use a bit of custom CSS like this:
#post-1096 #php_widget-4 {display:none;}
to hide the sharing buttons from that post.
In my case
php_widget-4
is the ID of the Graphene action hook widget I’m using. Yours will most likely be different.I’m going to leave that custom CSS in place until you get yours up and running, so let me know when you do. You can check the next post:
http://blog.kjodle.net/2011/12/30/changing-the-width-of-the-graphene-theme-for-wordpress/
to see that it only affects that particular post.
Interesting question! Thanks for making me think a bit.
Ken
Viewing 10 posts - 1 through 10 (of 16 total)
- 1
- 2
- You must be logged in to reply to this topic.