WordPress.org

Ready to get started?Download WordPress

Forums

OpenHook
Adding Pinterest button with OpenHook (10 posts)

  1. jennkrenn
    Member
    Posted 2 years ago #

    I am trying to add the Pinterest "Pin it" button to the bottom of every post (much like a re-tweet button or Facebook like). I am entering this code from the Pinterest site directly into the Thesis open hook "after_post" and am clicking save with the PHP enable box checked. However, when I save nothing changes.

    Any explanation as to why this would be the case? My site is http://www.eatingbender.com/. Thanks!

    <!-- Include ONCE for ALL buttons in the page -->
    <script type="text/javascript">
    (function() {
    window.PinIt = window.PinIt || { loaded:false };
    if (window.PinIt.loaded) return;
    window.PinIt.loaded = true;
    function async_load(){
    var s = document.createElement("script");
    s.type = "text/javascript";
    s.async = true;
    if (window.location.protocol == "https:")
    s.src = "https://assets.pinterest.com/js/pinit.js";
    else
    s.src = "http://assets.pinterest.com/js/pinit.js";
    var x = document.getElementsByTagName("script")[0];
    x.parentNode.insertBefore(s, x);
    }
    if (window.attachEvent)
    window.attachEvent("onload", async_load);
    else
    window.addEventListener("load", async_load, false);
    })();
    </script>

    <!-- Customize and include for EACH button in the page -->
    Pin It

    http://wordpress.org/extend/plugins/thesis-openhook/

  2. aka BrazenlyGeek
    Member
    Plugin Author

    Posted 2 years ago #

    Bender, when i view your site, it looks as though the PinIt button is working just fine. (I even pinned something to one of my boards from it.)

    You don't need to check the Process PHP button, though; that's all just regular HTML & JavaScript, so you can save the few milliseconds of processing by turning off PHP processing.

  3. jennkrenn
    Member
    Posted 2 years ago #

    Hey Rick,

    Thanks so much for your response. Actually, a few hours after I posted to the forum I found a Pinterest plug-in, which is what you see on the site now. But good to know about the PHP moving forward. I truly appreciate it!

    Jenn

  4. aka BrazenlyGeek
    Member
    Plugin Author

    Posted 2 years ago #

    Sorry to hear OpenHook didn't work out like you wanted. Are you having any luck with it? I mean, was it just that one customization in that one hook that wasn't behaving properly? I was able to add it to the OpenHook running on my site fine, but that doesn't mean anything (different servers, different this/that/etc.).

  5. jennkrenn
    Member
    Posted 2 years ago #

    Hey Rick,

    To be completely honest, I haven't used it for anything else yet because I just made the switch to Thesis on Friday! But I will definitely let you know once I try something else. For this particular issue I tried pasting it in both Firefox and Safari. As soon as I hit save, the page was automatically redirected to the OpenHook homepage (in other words, the after_post box disappeared so it was just the drop down menu of OpenHook options to choose from). And of course, unfortunately the changes did not show up on the site itself. Is the former normal?

    Thanks!

  6. aka BrazenlyGeek
    Member
    Plugin Author

    Posted 2 years ago #

    Yeah, that's normal. It's on my agenda to improve the usability of that. (Has been for ages...)

    Are you using a caching plugin, by chance? If so, you will need to flush the cache after updating OpenHook options in order for the changes to be seen on the front side.

  7. jennkrenn
    Member
    Posted 2 years ago #

    I'm actually not using a cachine plugin, but I just tried to do something new with OpenHook (change the WP footer and disable the Thesis attribution) and it once again did not do anything after I pushed save. Would downloading the caching plugin help, or is there anything you can think of that would cause it not to work?

  8. jennkrenn
    Member
    Posted 2 years ago #

    *caching not cachine :)

  9. aka BrazenlyGeek
    Member
    Plugin Author

    Posted 2 years ago #

    Do you the Thesis actions enabled on the General tab of OpenHook?

  10. jennkrenn
    Member
    Posted 2 years ago #

    I think I figured it out! The Thesis actions weren't enabled and I cleared my cache. Now it's working like a charm. Thanks for being patient with this novice. I appreciate the help, Rick!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic