WordPress.org

Ready to get started?Download WordPress

Forums

Really simple Facebook Twitter share buttons
[resolved] Pinterest Counter not Counting (16 posts)

  1. sortagourmet
    Member
    Posted 1 year ago #

    I noticed a few weeks ago (it may have been happening for a long time) that my pinterest counter on image posts isn't counting. The linking all seems to work and the button shows, but no counter.

    I updated the plugin to the most recent version and am running up-to-date wordpress. Any help would be appreciated.

    http://www.sortagourmet.com

    -Lauren

    http://wordpress.org/extend/plugins/really-simple-facebook-twitter-share-buttons/

  2. livelovepasta
    Member
    Posted 1 year ago #

    I'm also having this problem.

    See: http://livelovepasta.com/2011/08/strawberry-lemonade-vodka/

    Please help!

    I just installed this plugin yesterday if that makes a difference. I have to choose from all images as well as to display pin-it button on hover. The button itself works great when tested. All other counters work fine.

  3. whiletrue
    Member
    Plugin Author

    Posted 1 year ago #

    Hi, have you enabled the "Always use multiple image selector" plugin option? In this case the PinIt counter is always hidden (it's an automated Pinterest behaviour).

  4. livelovepasta
    Member
    Posted 1 year ago #

    Oh, I did have that checked to allow the readers the freedom of selecting their own image. I will uncheck it and see if that solves the problem then, thanks!

  5. livelovepasta
    Member
    Posted 1 year ago #

    May I recommend, in a future update, putting in parenthesis some info stating that by selecting "Always use multiple image selector", the Pinterest counter will not work, or having an edit in the plugin that will not allow people to select BOTH the "Show Counter" and "Always use multiple image selector" options.

    Thanks again.

  6. whiletrue
    Member
    Plugin Author

    Posted 1 year ago #

    Absolutely! Unfortunately the code has changed a lot recently due to the Pinterest's crazy and continuous code updates!

  7. sortagourmet
    Member
    Posted 1 year ago #

    I had forgotten I had posted this!

    I tried both selecting and deselecting the multiple images option and neither way showed the counter, even on pages I know I have several links to:

    http://www.sortagourmet.com/2012/07/01/maria-albas-authentic-mexican-rice/

    Any thoughts?

  8. darwood
    Member
    Posted 1 year ago #

    I have found that this problem occurs when the pinit.js is loaded more than once on a page. For example i have pinit.js loading just before the </body> tag in my footer file, however i use a plugin that also loads the same file and there is no way to turn it of in the settings. What i did to overcome this was create some javascript to check the name of the url and if it did not match load the pinit.js. See below.

    <script type="text/javascript">
    if (window.location.href.indexOf("khan") > -1 || window.location.href.indexOf("rachel") > -1) {
    	<!-- window.alert('script not loaded'); -->
        } else {
            <!-- window.alert('script loaded'); -->
    var scr = document.createElement("script");
    scr.src = "//assets.pinterest.com/js/pinit.js";
    document.getElementsByTagName("head")[0].appendChild(scr);
        }
    </script>

    I hope this helps.

  9. livelovepasta
    Member
    Posted 1 year ago #

    Thanks Darwood, you're exactly right!

    I looked at my page source and sure enough there were two separate instances of pinit.js. I removed the pinterest button from a set of social icons I was using in a different plugin and reloaded my last post and the counter was working again!

    Thank you.

  10. whiletrue
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Darwood, very clever!
    I wasn't able to find it because I've never added multiple social plugins in my test environments ... I'm definitively doing it from now on!

    p.s. the new 2.10.1 plugin release embeds your code, please update and tell me if it works! Thanks again!

  11. sortagourmet
    Member
    Posted 1 year ago #

    So I went through and updated the plugin and removed all other lingering social media share plug ins (including one I wanted, whoops).

    As I did that, I saw some strange behavior. After removing a plug in, I'd refresh this page: http://www.sortagourmet.com/2012/07/30/toastedravioli/

    The first time I refreshed it, the counter would be there. If I navigated away and came back, though, it was gone. Sure enough, if I removed another plug in, refreshed, counter would come back. But if I refreshed again, it wouldn't be there.

    Maybe that helps diagnose it?

  12. sortagourmet
    Member
    Posted 1 year ago #

    And to add one strange note -- if I let the page sit for a bit and refresh the counter came back? Then I refreshed again and it was gone. It's a war.

  13. darwood
    Member
    Posted 1 year ago #

    sortagourmet,
    I checked your source quickly. One thing i noticed was starting on line 48 you still have my pages, rachel and khan, rename those to your pages that you want the js to load on. You removed the else statement from my code example so it will only load the pinit.js if the page url is one of those.

  14. whiletrue
    Member
    Plugin Author

    Posted 12 months ago #

    Hi all,
    I digged a bit more and wrote new code to attempt to address the issue in different environments. Please update to 2.10.3 and tell me if it works in your sites.

  15. Joelle
    Member
    Posted 11 months ago #

    After upgrading to 3.6 WordPress and 2.10.3, I'm unable to get the pinterest count to work. It's showing the same high number on all posts except the last one on the page it shows no count, not even zero.

  16. Joelle
    Member
    Posted 11 months ago #

    Turns out I had to turn off "Always Choose Multiple Image Selector".

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.