Sharebar works on my pages but doesn't work on posts, is there any way to fix it?
Works on pages, doesn't work on posts
(9 posts) (2 voices)-
Monjurul Dolon Posted 1 year ago #
Hey Lana,
Do you have the first option checked in the Sharebar settings page (auto add to posts)? Are you adding the Sharebar PHP code manually or is the problem occurring out of the box?
-
Monjurul Dolon Posted 1 year ago #
Okay so the problem is, this one line of code:
<script type="text/javascript">jQuery(document).ready(function($) { $('.sharebar').sharebar({horizontal:'false',minwidth:1000,position:'left',leftOffset:20,rightOffset:10}); });</script>is supposed to be added to the footer of your page for both single posts and pages, however it's only showing up on your pages. I've just verified the plugin does add the code correctly in my test blog, using the default WordPress 3.0 Twenty Ten theme - perhaps this error is occurring due to your theme?
One way to test it out would be to switch your theme to Twenty Ten (or another theme) for a minute to see if the Sharebar shows up correctly or not. If it does, then it's likely that the theme you're using isn't calling the wp_footer function in their single posts template (single.php), the hook I use to insert the Sharebar code.
Does that all make sense? Try out another theme if at all possible, it'll help us isolate the problem. If it does turn out to be the theme, you should just be able to add that piece of code that I pasted above to your single.php and the plugin should work fine.
-
Monjurul Dolon Posted 1 year ago #
Yes, give that a shot. Just add the above code to your
single.phpfile for now and let me know if that works. If not there are a few other options to try as well. -
Monjurul Dolon Posted 1 year ago #
You're very welcome! Remember to leave a rating on the plugin page if you can, and let others know about it too.
I also have a couple of more plugins like this and a free WordPress theme I'm planning on releasing in the coming months, so check back for those as well!
Reply
You must log in to post.
