SHARE
TWEET

Twitter Card

ajkohn Jun 18th, 2012 1,695 Never
  1. <!-- Twitter Card -->
  2. <?php if(is_single() ) {?> <meta name="twitter:card" value="summary">
  3. <meta name="twitter:creator" value="@ajkohn">
  4. <meta name="twitter:url" value="<?php echo get_permalink(); ?>">
  5. <meta name="twitter:title" value="<?php echo get_the_title(); ?>">
  6. <meta name="twitter:description" value="<?php echo get_post_meta($post->ID, '_aioseop_description', $single = true); ?>">
  7. <?php if(get_post_meta($post->ID, 'og_img')){ ?>
  8. <meta name="twitter:image" value="<?php echo get_post_meta($post->ID, 'og_img', $single = true); ?>" />
  9. <?php } else { ?>
  10. <meta name="twitter:image" value="http://www.blindfiveyearold.com/wp-content/uploads/2008/09/blind-five-year-old-150x150.png" />
  11. <?php } ?> <?php }?>
RAW Paste Data
Top