WordPress.org

Ready to get started?Download WordPress

Forums

Sharing links with thumbnails using custom field. (1 post)

  1. halluzineyt
    Member
    Posted 3 years ago #

    // facebook connect digg social media image
    function get_social_img() {
        global $post;
        if ( is_single ()){
           $image = get_post_meta($post->ID, 'your_custom_field_name', $single = true);
           ?>
           <link rel="image_src" href="<?php echo $image; ?>" />
           <?
        }
    }
    add_action('wp_head', 'get_social_img');

    I have used this and placed on my functions.php it worked for some but there are some that didn't showed thumbnails is there some updating required to have all my post show thumbnails on facebook can somebody check this is my site: http://www.flippish.com.

Topic Closed

This topic has been closed to new replies.

About this Topic