İnsanları içeriğinizi sosyal medyada paylaşmaya teşvik etmek, kitlenizi büyütmek ve insanların işletmeniz hakkında heyecanlanmasını sağlamak için harika bir yoldur.
Ancak gerçek şu ki, insanlar içeriğinizi yalnızca bunu onlar için kolaylaştırırsanız paylaşacaktır.
WPBeginner blogunda sosyal paylaşım düğmelerini kullanıyoruz, böylece okuyucularımız içeriğimizi basit bir tıklama ile paylaşabilir, bu yüzden ne hakkında konuştuğumuzu biliyoruz. 🤓
Deneyimlerimize göre Pinterest, özellikle fotoğraflar, infografikler ve dijital sanat eserleri gibi görsel içerikler yayınlıyorsanız, WordPress sitenize trafik çekmek için harika bir platformdur.
WordPress sitenize bir ‘Pin It’ düğmesi eklemek, ziyaretçilerinizin görselleri veya diğer görsel içerikleri Pinterest panolarında hızlı bir şekilde paylaşmalarını sağlar. Ayrıca, birçok avantajı olabilir! Düşünün: daha fazla ziyaretçi, daha fazla yorum ve daha fazla satış. 💥
Bu makalede, WordPress’e Pinterest ‘Pin It’ düğmesini nasıl ekleyeceğinizi göstereceğiz.

WordPress’e Neden Pinterest ‘Pin It’ Düğmesi Eklemelisiniz?
Pinterest, kullanıcıların panolar oluşturarak web sitesi bağlantılarını ve diğer görsel içerikleri toplamasına olanak tanıyan popüler bir sosyal medya platformudur.
Kullanıcılar içeriğinizi Pinterest panolarına eklediğinde, diğer insanların web sitenizi keşfetmesine yardımcı olur. Bir fotoğrafçılık web sitesi, moda blogu veya çok sayıda resim ve video içeren başka bir blog türü işletiyorsanız Pinterest özellikle önemli bir trafik kaynağıdır.
Web sitenize bir ‘Pin It’ düğmesi eklemek, ziyaretçileri içeriğinizi Pinterest’te paylaşmaya teşvik edebilir.

Not: Pinterest 2016 yılında ‘Pin It’ butonunun adını resmi olarak ‘Kaydet’ olarak değiştirdi. Ancak, birçok rehber ve WordPress eklentisi hala ‘Pin It’ kullanıyor, bu yüzden bu kılavuzda orijinal adı kullanıyoruz. Ayrıca, kulağa daha çekici geliyor!
Bununla birlikte, WordPress’te Pinterest ‘Pin It’ düğmesini nasıl ekleyebileceğinizi görelim. Kullanmak istediğiniz yönteme doğrudan atlamak için aşağıdaki hızlı bağlantıları kullanmanız yeterlidir:
Yöntem 1: Gönderilere Pinterest ‘Pin It’ Düğmesi Ekleyin (Kolay Yol)
WordPress sitenize Pinterest butonu eklemenin en kolay yolu Novashare kullanmaktır. Bize göre, WordPress için en iyi sosyal medya eklentilerinden biridir.
Diğer tüm büyük sosyal ağlar için düğmelerin yanı sıra sitenize kolayca bir Pinterest düğmesi eklemenizi sağlar. Novashare’i birçok farklı kullanım durumu için test ettik ve kullanımının bu kadar kolay olmasını gerçekten sevdik. Eklenti hakkında daha fazla bilgi için Novashare incelememizin tamamına bakın.
Başlamak için Novashare web sitesini ziyaret etmeniz ve bir plan seçmeniz gerekir. Ardından, eklentiyi yüklemeniz ve etkinleştirmeniz gerekecektir. Yardıma ihtiyacınız varsa, bir WordPress eklentisinin nasıl kurulacağına ilişkin kılavuzumuza bakın.

Etkinleştirmenin ardından, lisansınızı etkinleştirmek için WordPress kontrol panelinizdeki Ayarlar ” Novashare sayfasına gitmelisiniz.
Basitçe ‘Lisans’ sekmesine tıklayın, eklentiyi satın aldığınızda size verilen lisans anahtarını yapıştırın ve ardından ‘Lisansı Kaydet’ düğmesine tıklayın.

Lisansınızı etkinleştirdikten sonra, web sitenize bir Pinterest simgesi ve istediğiniz diğer sosyal paylaşım simgelerini ekleyebilirsiniz. Bu simgeleri içeriğinizle aynı hizada veya kayan çubuk olarak ekleyebilirsiniz.
Burada ilk seçeneği kullanacağız (ancak kayan çubuklar hakkında daha fazla bilgi için okumaya devam edin).
Novashare’de ‘Satır İçi İçerik’ sekmesine gidin ve ‘Satır İçi İçeriği Etkinleştir’ seçeneğini açın. Ardından, Pinterest düğmesine tıklayarak kırmızıya dönmesini sağlayın.
Bu noktada, sosyal paylaşım düğmesi çubuğuna eklemek istediğiniz diğer sosyal ağları da etkinleştirebilirsiniz.

Bundan sonra, aşağı kaydırabilir ve düğme çubuğunu yapılandırmak için mevcut seçenekleri kullanabilirsiniz.
Düğme çubuğunu yazılarda, sayfalarda ve daha fazlasında görüntülemek için ayarlar vardır. Düğmelerin rengini ve tasarımını da özelleştirebilirsiniz.
Hatta düğmelere etiketler ekleyebilir ve mevcut gönderinin sosyal medyada kaç kez paylaşıldığına dair bir sayı gösterebilirsiniz.
Tüm bu seçenekleri ve kayan çubukları WordPress’te sosyal paylaşım düğmelerinin nasıl ekleneceğine ilişkin kılavuzumuzda ayrıntılı olarak ele alıyoruz.
‘Pin It’ düğmenizi özelleştirmeyi tamamladığınızda, sayfanın en altına gidin. Burada, yeni ayarları kaydetmek için ‘Değişiklikleri Kaydet’ düğmesine tıklayın.
Artık Pinterest düğmesini çalışırken görmek için WordPress web sitenizi ziyaret edebilirsiniz.

Yöntem 2: Görsellere Pinterest ‘Pin It’ Düğmesi Ekleme (Kolay Yol)
Bir moda, fotoğraf veya yemek blogu mu işletiyorsunuz? O halde bu görsellerin üzerine bir Pinterest düğmesi eklemek isteyebilirsiniz. Bu, ziyaretçilerin sabitlemek istedikleri görselin üzerine gelerek içeriğinizi paylaşmalarına olanak tanır.
Yöntem 1’de kullandığımız Novashare eklentisi, sitenizdeki herhangi bir görselin üzerine geldiğinizde bir Pinterest ‘Pin’ düğmesi de ekleyebilir.
Bir lisans satın aldıktan ve eklentiyi kurduktan sonra, yukarıda Yöntem 1 ‘de açıkladığımız gibi, Ayarlar ” Novashare ‘e gidin ve ‘Pinterest’ sekmesine tıklayın.
Şimdi, ‘Resim Pinlerini Etkinleştir’ seçeneğini açın ve düğmeyi görüntülemek istediğiniz ‘Gönderi Türlerini’ seçin.

Ardından, düğme konumunu, şeklini ve rengini özelleştirebilirsiniz. Diğer varsayılan ayarlar çoğu web sitesi için iyi çalışacaktır.
İsterseniz, Pinterest düğmesini yalnızca fareyi bir görselin üzerine getirdiğinizde değil, her zaman görsellerin üzerinde görüntüleyebilirsiniz. Bunu yapmak için ‘Her Zaman Göster’ seçeneğini etkinleştirmeniz gerekir.

Bazı web sitesi sahiplerinin paylaşılmasını istemedikleri birkaç görsel vardır. Bu durumda, dosya adlarını ‘Hariç Tutulan Görseller’ alanına yazabilirsiniz.
Ayarlardan memnun olduğunuzda, ‘Değişiklikleri Kaydet’ düğmesine tıkladığınızdan emin olun. Ardından, Novashare resimler üzerinde Pin düğmesini görüntülemeye başlayacaktır.

Yöntem 3: Özel Kısa Kod Kullanarak Pinterest ‘Pin It’ Düğmesi Ekleme
Bazen, ‘Pin It’ düğmesinin sitenizde tam olarak nerede görüneceğini kontrol etmek isteyebilirsiniz. Örneğin, Pinterest düğmesini belirli bir reklam açılış sayfasında veya gönderi içeriğinin içinde göstermek isteyebilirsiniz.
Bu durumda, bir seçenek de düğmeyi kod kullanarak oluşturmak ve ardından özel bir kısa kod kullanarak her sayfaya veya gönderiye yerleştirmektir. Bu size ‘Pin It’ düğmesini farklı konumlarda gösterme özgürlüğü verir, ancak her sayfaya veya gönderiye manuel olarak eklemeniz gerekecektir.
WordPress’e özel kod eklemenin en kolay yolu WPCode kullanmaktır. Web sitenize özel PHP, CSS, JavaScript ve daha fazlasını eklemenizi sağlar.
İş ortağı markalarımızın birçoğu sitelerindeki kod parçacıklarını yönetmek için bu eklentiyi kullanıyor ve hepsi de bu eklentiyi ne kadar sevdiklerini bize bildirdiler. Daha fazla bilgi için WPCode incelememizin tamamına bakın.
WPCode’u özel kısa kodlar oluşturmak için de kullanabilirsiniz, bu nedenle web sitenize bir ‘Pin It’ düğmesi eklemek için mükemmeldir.
Öncelikle, ücretsiz WPCode eklentisini yüklemeniz ve etkinleştirmeniz gerekecektir. Daha fazla bilgi için, WordPress eklentisinin nasıl yükleneceğine ilişkin adım adım kılavuzumuza bakın.
Eklenti etkinleştirildikten sonra Code Snippets ” Snippet Ekle bölümüne gidin.

Burada, WPCode’un sitenize ekleyebileceği önceden hazırlanmış tüm parçacıkları göreceksiniz. Bunlar, WordPress’e sosyal paylaşım düğmeleri eklemenize ve sosyal simgelerinizi bir kenar çubuğunda görüntülemenize olanak tanıyan parçacıkları içerir.
Şimdi, farenizi ‘Özel Kodunuzu Ekleyin (Yeni Snippet)’ seçeneğinin üzerine getirmeniz ve göründüğünde ‘+ Özel Snippet Ekle’ düğmesine tıklamanız gerekir.

Ardından, WordPress’e PHP ekleyeceksiniz, bu nedenle kod türü olarak ‘PHP Snippet’i seçmeniz gerekir.

Bir sonraki ekranda, kod parçacığı için bir başlık yazın.
Bu sadece referans içindir, bu yüzden istediğiniz herhangi bir şeyi kullanabilirsiniz. Bu eğitim için ‘Pinterest Pin It Button’ yazacağız.

Bunu yaptıktan sonra, aşağıdakileri kod düzenleyiciye yapıştırın:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function get_pin( $atts ) { global $post ; if ( $post ) { $pinterestimage = wp_get_attachment_image_src(get_post_thumbnail_id( $post ->ID), 'full' ); if ( $pinterestimage ) { return '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode(get_permalink( $post ->ID)) . '&media=' . $pinterestimage [0] . '&description=' . get_the_title() . '" class="pin-it-button" count-layout="vertical">Pin It</a>' ; } else { return 'No Pinterest image available.' ; } } else { return 'No post found.' ; } } add_shortcode( 'pin' , 'get_pin' ); |
Bundan sonra, sayfayı aşağı kaydırarak ‘Ekleme’ bölümüne gelin. Burada, kodun her yerde çalıştığından emin olmak için varsayılan ‘Otomatik Ekle’ yöntemini koruyabilirsiniz.
Henüz seçili değilse, ‘Her Yerde Çalıştır’ı seçin

Son olarak, ekranın üst kısmına kaydırın ve ‘Etkin Değil’ kaydırıcısına tıklayarak ‘Etkin’i göstermesini sağlayın.
Ardından, kod parçacığını canlı hale getirmek için ‘Snippet’i Kaydet’ veya ‘Güncelle’ düğmesine tıklamanız yeterlidir.

Artık [pin]
kısa kodunu kullanarak herhangi bir WordPress sayfasına, gönderisine veya widget’a hazır alana bir ‘Pin It’ düğmesi ekleyebilirsiniz.
Kısa kodun nasıl yerleştirileceğine ilişkin adım adım talimatlar için lütfen WordPress’te kısa kod ekleme kılavuzumuza bakın.
![use the [pin] shortcode in your WordPress posts](https://www.wpbeginner.com/wp-content/uploads/2019/06/pinterest-add-shortcode.png)
Bu kodu ekledikten sonra, ziyaretçiler öne çıkan bir görsele sahip herhangi bir sayfada veya gönderide bir ‘Pin It’ düğmesi göreceklerdir.
Sayfada öne çıkan bir görsel yoksa, bunun yerine ‘Pinterest görseli yok’ hata mesajını görürler.
Tam Site Düzenleyicisini Kullanarak Pinterest ‘Pin It’ Düğmesi Ekleme
Daha yeni blok özellikli temalardan birini kullanıyorsanız, özel kısa kodu kullanarak WordPress temanızın herhangi bir yerine bir ‘Pin It’ düğmesi ekleyebilirsiniz.
Bu, düğmeyi her sayfaya ve gönderiye eklemenin kolay bir yoludur. ‘Pin It’ düğmesini, sitenizin 404 sayfa şablonu gibi standart WordPress içerik düzenleyicisini kullanarak düzenleyemediğiniz alanlara da ekleyebilirsiniz.
Başlamak için WordPress panosundaki Temalar “ Editör bölümüne gitmeniz yeterlidir.

Varsayılan olarak, tam site düzenleyicisi temanızın ana şablonunu gösterecektir.
Farklı bir sayfaya ‘Pin It’ düğmesi eklemek için sol taraftaki menüden ‘Şablon’ veya ‘Şablon Parçaları’nı seçmeniz yeterlidir.

Şimdi düzenlemek istediğiniz şablonu seçebilirsiniz.
Bu örnekte, sitenizin Tek sayfa şablonuna nasıl bir ‘Pin It’ düğmesi ekleyeceğinizi göstereceğiz. Ancak, hangi şablonu seçerseniz seçin adımlar benzer olacaktır.

WordPress şimdi şablonun veya şablon parçasının bir önizlemesini gösterecektir.
Bu şablonu düzenlemek için devam edin ve küçük kalem simgesine tıklayın.

Bunu yaptıktan sonra, sol üst köşedeki mavi ‘+’ simgesine tıklayın.
Görüntülenen arama çubuğuna ‘Kısa kod’ yazın.

Doğru blok göründüğünde, bunu şablon düzenine sürükleyip bırakın.
Artık Pin
kısa kodunu bloğa yazabilirsiniz.

Bundan sonra, yeni kısa kodu canlı hale getirmek için ‘Kaydet’e tıklamanız yeterlidir.
Şimdi, WordPress web sitenizi ziyaret ederseniz, ‘Pin it’ düğmesini çalışırken göreceksiniz.
Yöntem 4: Kod ve FTP Kullanarak Pinterest ‘Pin It’ Düğmesi Ekleme
Web sitenize eklenti olmadan Pinterest butonu eklemenin bir başka yolu da doğrudan tema dosyalarınıza kod eklemektir. Ancak bu yöntem sadece teknik kullanıcılar için uygundur.
Tema dosyalarını doğrudan düzenlemek birçok yaygın WordPress hatasına neden olabilir ve WordPress temasını güncellediğinizde tüm özel kodları kaybedersiniz. Bunu göz önünde bulundurarak, bunun yerine her zaman WPCode kullanmanızı öneririz.
Ancak, bu yöntemi kullanırsanız, sitenizin eksiksiz bir WordPress yedeğini alarak başlamanız gerekecektir. Bu, kazayla bir şeylerin bozulması durumunda sitenizi geri yüklemenize yardımcı olacaktır.
Bunu yaptıktan sonra, bir FTP istemcisi kullanarak WordPress hostinginize bağlanın ve ardından /wp-content/themes/
klasörüne gidin.
Buradan, mevcut tema klasörünüzü açmanız ve ardından footer.php
dosyasını bulmanız gerekir.

Ardından, bu dosyaya sağ tıklayın ve ardından menüden ‘İndir’i seçin. Bu footer.php dosyasını bilgisayarınıza indirecektir.
Şimdi, footer.php
dosyasını Not Defteri gibi bir düz metin editörü kullanarak açmanız ve aşağıdaki betiği </body>
etiketinden hemen önce yapıştırmanız gerekir.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <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 ; s.src = "https://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> |
Bunu yaptıktan sonra, dosyayı kaydetmeniz ve ardından mevcut tema klasörüne geri yüklemeniz gerekir.
Ardından, temanızda düğmeyi eklemek istediğiniz şablon dosyasını bulun. Genellikle bu single.php dosyası olacaktır, ancak WordPress temanıza bağlı olarak değişebilir. Emin değilseniz, WordPress şablon hiyerarşisine ilişkin yeni başlayanlar için kılavuzumuza bakabilirsiniz.
Şablon dosyasını düzenlemek için tema klasörünüzden indirmeniz ve düzenlemek üzere açmanız yeterlidir.
‘Pin It’ düğmesini göstermek istediğiniz konumu seçmeniz gerekecektir. Birçok web sitesi sosyal paylaşım düğmelerini doğrudan gönderi başlığının altında gösterir, ancak siz istediğiniz herhangi bir konumu kullanabilirsiniz.
Bir konum seçtikten sonra, aşağıdaki kodu eklemeniz yeterlidir:
1 2 | <?php $pinterestimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post ->ID ), 'full' ); ?> <a href= "http://pinterest.com/pin/create/button/?url=<?php echo urlencode(get_permalink($post->ID)); ?>&media=<?php echo $pinterestimage[0]; ?>&description=<?php the_title(); ?>" class = "pin-it-button" count -layout= "vertical" >Pin It</a> |
Yukarıdaki kod parçacığı, gönderinin öne çıkan görselini, başlığını, açıklamasını ve URL’sini paylaşım URL’si parametresine ekler.
Bu kod parçacığı ayrıca tüm gönderilerinize dikey bir paylaşım düğmesi ekleyecektir. Bunun yerine yatay bir paylaşım düğmesi görüntülemek istiyorsanız, count-layout="vertical">
bölümünü count-layout="horizontal">
olarak değiştirmeniz yeterlidir.
Hazır olduğunuzda dosyayı kaydedin ve FTP kullanarak doğrudan temanıza geri yükleyin.
Bonus: WordPress ve Sosyal Medya Hakkında Ek Kılavuzlar
WordPress’i sosyal medya ile nasıl kullanacağınız hakkında daha fazla bilgi edinmek ister misiniz? Bu acemi dostu kılavuzlara göz atın:
- Pinterest Öldü mü? Blogunuza Pinterest Trafiğini Nasıl Artırırsınız?
- WordPress Sitenizi Pinterest’te Doğrulama (Adım Adım)
- WordPress’ten Instagram’a Otomatik Olarak Nasıl Yayınlanır
- Blogunuzu Büyütmek için En İyi WordPress Facebook Eklentileri
- Sosyal Medya İstatistikleri (Bloggerlar için Nihai Liste)
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Jiří Vaněk
Thanks for the php snippet. I tried it on one of the sites and it works like a charm. You have saved me some space between plugins. Good job.
Alison
Hi. I just added shared counts and the Pinterest add-on plugins recently. They seem to work fine, but I notice they haven’t been updated in several years nor have they been tested with my version of WordPress. Should I be looking for a new plugin or are they still ok to use?
WPBeginner Support
The shared count plugin was updated 2 months ago and it should still be working well, for the warnings we would recommend taking a look at our article below for why you shouldn’t be very concerned
https://www.wpbeginner.com/opinion/should-you-install-plugins-not-tested-with-your-wordpress-version/
Admin
Julie
I’m looking to add an individual graphic pin that I’ve custom designed to the travel blog post it belongs to (like the best things to do in Jaipur). Is that what this article is covering or is it just the literal Pinterst “Button” that looks like the Pinterst logo? Sorry to be co fixed with this technicality, but an image or two would make this much clearer what specifically the “button” you are referring to is….thank you in advance…
WPBeginner Support
This is for the Pinterest pin it button, the second screenshot in the article should be what you are looking for as an example.
Admin
Ellen
It works!! thankyou
WPBeginner Support
Glad our guide could help
Admin
Kara
After I installed the plugin, it never showed up in the settings.
WPBeginner Support
You would want to ensure you activate the plugin as well.
Admin
Jais
Thanks. It works.
WPBeginner Support
You’re welcome, glad it worked for you
Admin
laira
hi wpbeginner, I follow your codes, may i know if i will still pin the images on my pinterest boards? or it will automatically pin there? Im still a beginner in this platform. thank you
WPBeginner Support
The button when used would add it to your board.
Admin
Lorraine Reguly
Thanks for the code. I just added it to my author site. (I have no idea how the Pinterest button shows up on my images on my business site, but it does.)
Now my author site is all set up!
Thanks, Syed.
P.S. I just followed you on Pinterest.
WPBeginner Support
Hey Lorraine,
Thanks for following us on Pinterest. You can also find us on Twitter and Facebook.
Admin
RB
this is work !! thanks
and
I wonder…
how can I change icon? Icon is still same when change code
Thales
I did the last option, adding the short code to my theme’s functions.php file. It worked, but I couldn’t save my posts as draft anymore. Then I removed the code and it is not working. My site is still online, but I cannot log in into my site anymore. The following message appear:
Warning: Cannot modify header information – headers already sent by (output started at /home/peque107/public_html/wp-content/themes/himmelen/functions.php:2) in /home/peque107/public_html/wp-includes/pluggable.php on line 1224
Please help!
Emma steave
Thanks. Its great
Carissa
Does this only apply for wordpress.org blogs? I have a wordpress.com blog and I am not sure if I can add this plugin to it?
Thank you!
WPBeginner Support
Yes it is for WordPress.org. Please see our guide on the difference between self hosted WordPress.org vs free WordPress.com blog.
Admin
Ruth
I have a problem. I followed the instructions and came up with this error:
Parse error: syntax error, unexpected ‘<' in /home/cmomb/butfirstwehavecoffee.com/wp-content/themes/notepad/functions.php on line 18
Now I cannot get rid of it. Could someone advise. My site is now down.
WPBeginner Support
Open the functions.php file in a text editor like notepad. Go to line 18. You probably have <?php tag there that you don’t need. Delete it and also delete the ?> closing tag
Admin
Ian Harris
Thanks for this firstly
I am struggling to position the element. It is seeming to always sit in the top left of the div.
Is it possible to position it and also change the bg image to own custom one.
Thanks
Paradise Found Around
Great tutorial, as usual. I was wondering though if there was a way to modify it to use a custom button in place of the starboard one that automatically comes up.
Thanks,
Mark
mark taylor
Good tutorial, i have put it on my site without any problems, i then tested it and it worked, but it still says 0 after i pinned.
Mark
vrinda
I tried so many plugins… they don’t work with infinite scroll and nextgen gallery…. but with some changes this script solved my issue.. thanks
Michael
Hello,
I just want to ask if I could change the size of the “pin it” button? Because it seems that it was a little bit small.
Regards,
Michael
Editorial Staff
You could use the pin count layout vertical or horizontal. Other than that, no you cannot change the size.
Admin
Jenny
This code just recently stopped working. I had it on my site and it was working great and recently images appear to be working but then when you go view the pinboard there is no image set. Other times when trying to pin it 502 error that comes from the Pinterest site. Any ideas?
Editorial Staff
Probably server errors on Pinterest’s end. We have this code running on our other sites.
Admin
Ido Schacham
There’s a bug in the code. The generated href for the pin it button should include ‘url=’, currently it’s missing the equals sign.
Editorial Staff
Fixed the shortcode code for that. Thanks for reporting it
Admin
jess
For wordpress users..adding the pin it or any other social media is easy! Under dashboard, go to setting, click on sharing and they all appear- click on what you want to add!
Editorial Staff
You are referring to WP.com sites. This tutorial is for self-hosted WordPress sites. Two different things.
Admin
Jen M
THANK YOU! I have been searching for how to do this for 2 days & downloaded something & that didn’t work, I was about to give up & then THANKFULLY read your comment. I appreciate someone making it as EASY as it really is, how come wordpress can’t do that?
Jenn K
Ooh, thanks for the tip! Exactly what I was looking for
Nick
Is there a way to customize this so you can select a custom image for the pin-it button ?
Editorial Staff
If you mean a custom image for your article, then yes you can. Look at the &media tag in the second code.
Admin
Husein Yuseinov
Hi,
I need to implement this code but in header file, but postthumbnail returns error?!
wpbeginner
@Husein Yuseinov You have to call the thumbnail code within your post loop. In order to call it in your header.php file, you must utilize the global variable.
https://www.wpbeginner.com/wp-themes/how-to-display-custom-fields-outside-the-loop-in-wordpress/
Husein Yuseinov
@wpbeginner Thanks for the fast respond, but I’m not a coder, and it’s hard for me to understand you.
wpbeginner
@Husein Yuseinov Ok… so here is what you do. Add the following line above $pinterestimage line inside the PHP tags:
global $wp_query;
$postid = $wp_query->post->ID;
Then replace $post->ID with $postid and it will work. Also after the code, you may want to end wp_reset_query();
This is the best we can do. What you are asking for requires coding. If you are unable to do this, then shoot us an email. We can help you out for a small fee.
robthecomputerguy
What in the world is going on with the “animhut blog” button on thee next 3 comments?
wpbeginner
@robthecomputerguy I think they just liked our comments, and livefyre is showing their profile.
robthecomputerguy
@wpbeginner Oh that’s fascinating – that didn’t even occur to me – thanks for the follow up!
FuturePocket
I tried adding this… it worked but when you click on “Pin it” and it opens the window in a new browser and you actually submit the pin, it just reloads the newly opened window and the pin isn’t submitted. Decided not to implement it until they’ve fixed their bugs.
Phil Derksen
If you don’t want to mess with adding code, I created a Pin It button plugin you can try out.
http://wordpress.org/extend/plugins/pinterest-pin-it-button/
(or just search for “pinterest pin it” under plugins)
Jean Oram
I used the ‘follow me’ code on the Pinterest Goodies page and pasted it into the ‘text’ widget on my WordPress blog. The button now appears right after my mini bio. It works quite well.
Editorial Staff
For any advanced theme framework like Thesis, Genesis, Headway etc, you have to add these codes via functions.php file using the framework appropriate hooks. We cannot possibly cover all the theme frameworks out there. Most theme framework blogs have instructions on how to do customize the themes.
Admin
wpbeginner
Your method seems a bit tedious because you would have to do it for each image.
Ruby
@wpbeginner It’s not ideal, but it’s really not much more than you have to do to post the image anyway. I’m still looking for a great option (plugin ideally) that a) works on my theme and b) is easy. Luckily, due to the popularity of Pinterest, I’m confident someone will have one up and running soon!
wpbeginner
Make sure you set $pinterestimage[0] otherwise it will return an array. Other than that not sure why you are getting the error.
merrittsgret
@wpbeginner It’s working now, thanks to the shortcode code you gave us. Thank you so much!
Now to get it to align with everything else via CSS… (http://ylcf.org/2012/01/tomorrow-2/) Ah, the joys.
wpbeginner
@merrittsgret Yeah, you might have to utilize the !important tag in some cases.
dave2
Any idea on how to change it from featured image to first image?
wpbeginner
@dave2 Use a variation of this snippet:https://www.wpbeginner.com/wp-themes/how-to-set-a-default-fallback-image-for-wordpress-post-thumbnails/
animhut blog
@wpbeginner @dave2 Thank you for the tutorial ! i need that for my another photography site
Gretchen
It works, but it shows the text “array” before the Pin It button. I’m calling it via my functions.php, like so “echo $pinterestimag…..<?php;" Could that be why?
Heidi at CrockPotLadies
I cannot seem to get it to work. I put the first code in my footer.php before the closing body tag and then added the other code into my single php after my other sharing buttons provided by po.st. Yet when I look at a post on my site (http://crockpotladies.com/recipe-categories/entrees/crockpot-chicken-enchiladas/) I do not see a Pin It Button. Any suggestions?
wpbeginner
@Heidi at CrockPotLadies We can see the button in the next line after the Subscribe to feed etc links.
wmwebdes
Only just started to hear about Pinterest – looks as though it is really taking off.
Thanks for the tut.
Ruby
Thanks for this. I recently tried a similar method but it doesn’t seem to work with my WordPress.org theme, so I came up with my own work-around and posted it here: http://www.tomaytotomaaahto.com/tools-and-tutorials/how-to-turn-your-images-into-pinterest-pin-it-buttons-wordpress
YeahThatsKosher
How do you get this to integrate with an existing WP plugin like Digg Digg or Sociable?
wpbeginner
@YeahThatsKosher You would have to ask the developers to do so for you.