For a lot of people this may be common knowledge, but if you are interested in having share “buttons” or “links” for Pinterest and/or Google+, the solution can be a bit hard to find. For pinterest, I found the solution myself, but for Google Plus, I cannot take the credit as it goes to this post.
If you have any questions or want the link format for any other social sharing website post in the comments and I will place it here as well. Here are the solutions.
- Because of Pinterest needing to pull an image for each article or resource that is pinned, you will need to edit your theme so that it supplies your post thumbnail URL. You may already know how to do this on your own, but if not Blogcastor has a great tutorial on how to do so. But I will reiterate it here.
- Open your functions.php file and insert this snippet:
- After saving this, you can now use the following tag to insert the URL of your post thumbnail anywhere in your theme files. You can specify what size variant of your thumbnail you would like to use by changing the text “large” to any other size you have for post thumbnails.
- Now you can place the following code in the loop for each post, allowing visitors to pin your posts to Pinterest.
- Your Pinterest share link now contains a link to your article, the link to the image associated with your article, and the excerpt with paragraph tags removed.
- However, now their is a solution. I can’t recall where I initially found this, but you can view another reference to it here.
All you need to include in your theme is this snippet: