Pin It Button doesn’t work? Try this one

I had a weird problem with Pin It button present on my floating share bar. It came to notice when I didn’t find any pins in my profile. Pin button use to give pop-up and it was all ok. However, after pinning it nothing was getting posted. I dug it up and change many buttons from official page. Alas! All in vain.

I came to know from many sources that there is a problem with ‘href’. Official Pin Button works properly only when there is a valid static URL. Now, WordPress and PHP are all about dynamic pages. So, I tried using permalink also;

It didn’t work. Second problem was with post titles and images. Pulling titles and images from dynamic URL is something that official code is not designed for. After so much Googling and code testing, I got which can be made to work. Idea came from a guy Ari Krzyzek.

This Pin button pulls post title automatically and also gives you an option to select images found in an article and also from related to it (Check below Screenshot). I am using the same for my manual floating social share bar.

working pinit button with image selection and auto title ijustutter

Put the following code into a PHP file (single post or Main Index) of your theme;

I used DIV container so that you can also use styling in your theme’s stylesheet.css. You can modify the margins, heights  and boundaries, etc.

I hope this works for you. If you want a full working floating share bar with pre-included Facebook, Google+, Twitter, etc in just two steps then please refer this article.

Enjoy!

Mrinal Buddekar

A Research Professional, Doctor, Technology Blogger
Mrinal Buddekar is a founder of I Just Utter. He is a technology enthusiast and author of many guides and how-to. Mrinal likes web development, linux, server administration and programming.