Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Twitter Card

By: ajkohn on Jun 18th, 2012  |  syntax: PHP  |  size: 0.71 KB  |  views: 1,368  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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 }?>