-
AuthorPosts
-
October 24, 2017 at 12:33 pm #868151
Hello,
for my food blog Pinterest is of big value due to the Pinterest friendly collages I create for each post. Your share button unfortunately only allows featured image, but this is not Pinterest friendly for me. So, I am using Pinterest „Pin it“ button via Pinterest widget builder for ONE image only to be used when someone pins from my site and I did it as per this instruction in this topic https://kriesi.at/support/topic/cant-embed-pinterest/:
1. Add the pinterest js in Enfold > Google Services > Google Analytics Tracking Code:
<script async defer src="//assets.pinterest.com/js/pinit.js"></script>
2. Copy the embed code from pinterest and place it in a code block element on any page (in this case I used code for button instead of pin), e.g. just as an example:
<a data-pin-do="buttonPin" data-pin-tall="true" href="https://www.pinterest.com/pin/create/button/?url=https%3A%2F%2Fwww.example.com&media=https%3A%2F%2Fexample.com%2Fimage.jpg&description=Example%20text"></a>
But, no matter what I do, I lose my embed code as soon as I switch from text mode to visual mode. Then I tried a second solution by using
<div style="display: none;"> ... </div>
for my collage, but this is only working when no featured image was added. But I think this code is not useful due to the missing DATA-PIN tags anyway, so I am not supposed to use it.
Do you have any idea what is happening here? How can I use the Pinterest code without losing it after switching from text mode to visual mode? Or how can I use the Enfold Pinterest share button pinning my collage only? Really hope you can help. Thank you in advance for your kind assistance in advance.
Kind regards,
SophieOctober 25, 2017 at 10:46 am #868643Hey Sophie,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaOctober 25, 2017 at 12:55 pm #868690Hello Victoria,
oh yes, of course. Please kindly find the login details in the below private content box. Thank you for your help in advance.
Have a great day!
Kind regards,
SophieOctober 27, 2017 at 9:00 am #869473Hi,
Thank you for the update. The editor finds the code invalid, that’s why it is removed when you switch between the editor. Please try the following plugin.
// https://wordpress.org/plugins/pinterest-pin-it-button-on-image-hover-and-post/
Best regards,
IsmaelOctober 27, 2017 at 8:03 pm #869737Hi Ismael,
thank you for your fast reply. So is this an error from Pinterest, because they generate the code for adding to post or page? I already tried this plugin, but it’s not useful for me, since I am not able to chose ONE image only. For each single blog post I would like to chose my own Pinterest collage only, not featured image etc. So this plugin does not fullfill my needs, but thanks for your recommendation. Is it possible to make the Enfold Pinterest Share Button using only one certain image?
Thank you for your help in advance.
Kind regards
SophieOctober 30, 2017 at 6:07 am #870320Hi,
You can create a custom pinterest shortcode. Please add this code in the functions.php file.
function avs_get_pin($atts) { $atts = shortcode_atts( array( 'image' => '', ), $atts, 'avs_pin' ); return '<a data-pin-do="buttonPin" data-pin-tall="true" href="http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink($post->ID)) . '&media=' . $atts['image'] . '&description=' . get_the_title() .'" class="pin-it-button" count-layout="vertical">Pin It</a>'; } add_shortcode('avs_pin', 'avs_get_pin');
Use the following shortcode.
[avs_pin image="IMAGE URL HERE"]
Replace the “IMAGE URL HERE” placeholder with the url of the image that you want to pin.
Best regards,
IsmaelOctober 30, 2017 at 2:26 pm #870472Hi Ismael,
I am speechless, this is working :-) ! I am so happy I can do this without any plugin! Thank you so much, Ismael! You made my day! I only have one small issue: How can I show up my custom description for the image to be pinned instead of showing the title? Because usually the title is shorter than a pin description and I don’t want the pinner to add or change the pin description first before pinning my images.
I thank you so much for all your efforts and I really do appreciate all your help!
Have a great day!
Kind regards,
SophieNovember 2, 2017 at 7:33 pm #871814Hi,
here is the updated code for you
function avs_get_pin($atts) { $atts = shortcode_atts( array( 'image' => '', 'description' => '', ), $atts, 'avs_pin' ); return '<a data-pin-do="buttonPin" data-pin-tall="true" href="http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink($post->ID)) . '&media=' . $atts['image'] . '&description=' . $atts['description'] . '" class="pin-it-button" count-layout="vertical">Pin It</a>'; } add_shortcode('avs_pin', 'avs_get_pin');
and the shortcode will be converted as
[avs_pin image="IMAGE URL HERE" description="DESCRIPTION HERE"]
Thank you very much
Best regards,
BasilisApril 19, 2018 at 3:43 pm #944131Hi Basilis,
thank you for the code. It once worked, but I just recognized that it does not work anymore: no image is being displayed somehow, but the description is. Is this code still valid? Can you help and tell how to make it work again?
Thank you for all your efforts in this issue.
Kind regards,
SophieApril 20, 2018 at 5:25 am #944427Hi,
It is working properly. Just tested it on the post above. Please provide a link to the post where the shortcode is not working.
Best regards,
IsmaelApril 22, 2018 at 7:52 pm #945112Hi Ismael,
please kindly find the link to the post and a screenshot how it looks e.g. in Chrome in the private content box. Somehow the image to be shared is not displaying.
Really do appreciate all your help.
Kind regards,
SophieApril 23, 2018 at 5:51 am #945240Hi,
This is how it looks on my browser. Please test it on another network or computer.
// https://imgur.com/a/F8KgT6k
The screenshot is from the Opera browser but it works the same on Chrome.
Best regards,
IsmaelApril 24, 2018 at 3:57 pm #945989Hi Ismael,
thank you for your message. I tested it on Chrome, Firefox and Internet Explorer on a Windows 7 Laptop of a friend of mine who never opened my website URL, but none of them are showing up any image.
Kind of weird, right?
Kind regards,
SophieApril 25, 2018 at 5:59 am #946399Hi,
Yes, it’s quite odd. It works properly on my end. I’ll ask the rest of the support team to check it.
Best regards,
IsmaelApril 25, 2018 at 2:04 pm #946584April 27, 2018 at 4:17 pm #948016Hi Mike,
thank you for your message. I tested it on Chrome, Firefox and Internet Explorer on a Windows 7 Laptop of a friend of mine who never called up my website URL so far, so the cache was clear, but none of the browsers are showing up any image.
I just tested again: In Chrome – for example – thee is a small indication error icon instead of the image to be shared. When right-clicking on this icon, copying the image address and opening it in a new Chrome window, it seems to “reload” the image and it is displaying in the Pinterest Pin it window properly. But, when right-clicking on the icon and choosing “Opening image in a new tab”, it shows 403 error: Forbidden / You do not have permission to access this document. I think that may be the issue?
That’s kind of spooky :-( . Don’t know how to solve this issue. Can you explain what is happening here?
Kind regards,
SophieApril 28, 2018 at 1:52 pm #948355Hi,
What you are seeing is a broken image icon, it’s very common in general. I researched this some more and found many reports from other pinterest users, typically once the image is fully in the pinterest system everything works fine, but they say it sometimes takes a little while.
Please try to make a pin and see if it works out.Best regards,
MikeMay 5, 2018 at 1:48 pm #952107Hi Mike,
I tested it. When saving a pin and having picked my requested board, it is really showing up in the board I selected. So it still seems to work. Thank you so much for your explanation and for figuring it out, Mike!
I think you can close this topic out now :o) .
Thanks again and kind regards,
SophieMay 7, 2018 at 2:59 am #952441Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
and the video tutorials here
And if there are features that you wish Enfold had, you can request them and vote the requested ones here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Pinterest "Pin it" button and share button issue’ is closed to new replies.