cemrepacun
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Fixing WordPress
In reply to: Post thumbnail in head…hope this helps, found it on google
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" <?php language_attributes(); ?>> <?php if (have_posts()):while(have_posts()):the_post();endwhile;endif;?> <!-- Facebook Opengraph --> <meta property="fb:app_id" content="your_app_id" /> <meta property="fb:admins" content="your_admin_id" /> <meta property="og:url" content="<?php the_permalink() ?>"/> <?php if (is_single()) { ?> <meta property="og:title" content="<?php single_post_title(''); ?>" /> <meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" /> <meta property="og:type" content="article" /> <meta property="og:image" content="<?php echo wp_get_attachment_thumb_url( get_post_thumbnail_id( $post->ID ) ) ?>" /> <?php } else { ?> <meta property="og:site_name" content="<?php bloginfo('name'); ?>" /> <meta property="og:description" content="<?php bloginfo('description'); ?>" /> <meta property="og:type" content="website" /> <meta property="og:image" content="<?php bloginfo('template_url') ?>/path/to-your/logo.jpg" /> <?php } ?>more info here:
http://www.werewp.com/wordpress/how-to-integrate-facebook-open-graph-protocol-into-your-wordpress-theme/
Viewing 1 replies (of 1 total)