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
Closed

Pinterest button taken over by pinit.js #34

billerickson opened this issue May 3, 2018 · 5 comments
Labels
Milestone

Comments

@billerickson
Copy link
Collaborator

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
Copy link
Collaborator Author

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

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

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
Copy link

blogambitions commented May 22, 2018

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

data-pin-do-none

@jaredatch
Copy link
Owner

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

@billerickson
Copy link
Collaborator Author

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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants