Hi
Think this should be straight forward to anyone who knows wordpress.
There are 2 tasks
1. add pinterest button to single posts
2. get opengraph og:images to work without a plugin
I'm manually setting up opengraph using the following but it's only calling my main image 530px530px which I think is too big so need help calling the thumbnail.
In [login to view URL]:
function get_fbimage() {
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '', '' );
if ( has_post_thumbnail($post->ID) ) {
$fbimage = $src[0];
} else {
global $post, $posts;
$fbimage = '';
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i',
[login to view URL]">
$post->post_content, $matches);
$fbimage = $matches [1] [0];
}
if(empty($fbimage)) {
$fbimage = "images/[login to view URL]";
}
return $fbimage;
}
Task is to either get this code to pull a thumb from my main post or an alternative way but I don't want to use a plugin.
My blog is a simple photography site, each post has one photo and a little caption. Once accepted I will send you my theme and you can work from that.
Feel free to ask any questions