Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinterest button taken over by pinit.js #34

Closed
billerickson opened this issue May 3, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@billerickson
Copy link
Collaborator

commented May 3, 2018

If your site includes the pinit.js code from Pinterest, the Pinterest button is converted into a "Save" button:

screenshot

I believe this has to do with the URL of the link. In this post it's recommended to use //pinterest.com/pin/create/%20button?url for custom share buttons because:

Apparently, this seems to be the correct URL when you want to include your own custom button and bypass calling pinit.js.

@billerickson

This comment has been minimized.

Copy link
Collaborator Author

commented May 3, 2018

Jared pointed out adding data-pin-do="none" resolves this.

@jaredatch jaredatch added this to the 1.2.0 milestone May 10, 2018

@blogambitions

This comment has been minimized.

Copy link

commented May 22, 2018

adding data-pin-custom="true" will make it so that Pinterest won't adjust any custom css or html you've added to the button.

this url "https://www.pinterest.com/pin/create/button/" will still work for the button.

data-pin-do determines which image is pinnable. I'd assume that marking none would make it so that no image can be saved to pinterest?

source: https://developers.pinterest.com/docs/widgets/save/

@blogambitions

This comment has been minimized.

Copy link

commented May 22, 2018

seems like data-pin-do="none" results in this:

data-pin-do-none

@jaredatch

This comment has been minimized.

Copy link
Owner

commented May 22, 2018

@blogambitions thanks for the details, really appreciate it :)

@billerickson

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 5, 2018

This change prevented the button from being changed visually, but pinit.js still makes our Pinterest button nonfunctional. It moves the pinterest link from href to data-pin-href, so when you click the Pinterest button it opens a blank window.

We should check if data-pin-href exists, and if so use that URL in our global JS file. It's hacky but seems to be the only solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.