1

I have of late been developing a custom WordPress theme for my own blog from the ground up! Most is not finished but my social sharing buttons are not working at all!

I have been using this tutorial.... http://www.jqueryscript.net/social-media/jQuery-Plugin-To-Customize-Social-Share-Buttons-Counters-SocialShare.html

and gone over all of my code with a fine tooth comb! I even tested it on a testing page and it's working fine there so i have no idea why it's not working on the actual theme!

I got a feeling it has something to do with my functions.php page as none of my widgets work in my sidebar which i have overcome by adding the custom code there! So i probably have to add some more code to my functions!

Also just to let you know eack of the buttons and their counters are contained within a div I made just below the_content and above the comments_template on my single.php

I am also running WordPress Version 3.9.1 if that helps

Any help would be greatly appreciated!

  • Phillip Dews
1

Without any examples, fiddles or code samples, it is impossible to assist. Having had a fair bit of experience with WP, this will be very difficult to help you with, unless you can provide a live site to look at. Even then, may be challengin' :)

Looking at that page you linked, your problem is almost certainly php-based, not jQuery. If your functions don't work and you're adding php code directly to your sidebars, then yeah, absolutely php.

A couple of things I can think of though that are commonly problematic:

  1. Check/test/debug your functions.php file by itself. Make SURE it's rock solid.
  2. If you're developing heavily, setup XDEBUG. Invaluable!
  3. If you're mostly themeing, check out the debugbar plugin.

Of course, you'll always want to make sure you're using the template hierarchy correctly (http://wphierarchy.com/). Double check every path you use, specifically the differences between paths to load stuff from themes -vs- child themes:

Oh yeah: functions.php in child themes loads in addition to the parent's functions.php, it does not replace it.

Hopefully something in here helps.

  • cheers Spanka! Hopefully something will help! Here is the theme and no it's not a child theme buddy! www.brum.pw – Phillip Dews May 11 '14 at 14:25
  • 1
    That's a lot of stuff going on in there mate! About the only thing I can offer (without losing DAYS of my life!) is to change your implementation script. You've got the default copied in (sweet), BUT you're referencing THEIR image and THEIR URL. If the script tries to look up the URL to get the count from twitter (or FB etc), then it's looking up their domain. I don't know much about same-origin JS policies and stuff - but I reckon that might be a hitch for returning a social count. Change the "image" and "URL" parameters to your details. See how you go! – Spanka May 11 '14 at 19:02
  • Cheers Dude that's helped a lot buddy! Many thanks Spanka! Will let you know how I get on! - PD – Phillip Dews May 12 '14 at 4:10

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.