Skip to content

Instantly share code, notes, and snippets.

View drewgeraets's full-sized avatar

Drew Geraets drewgeraets

  • Close.com
  • Woodbury, MN
View GitHub Profile
@drewgeraets
drewgeraets / gist:3440093
Created August 23, 2012 18:40
Co-Authors Plus: Pulling author meta data
<?php $coauthors = get_coauthors(); ?>
<?php foreach( $coauthors as $coauthor ) : ?>
<?php if ( get_user_meta( get_the_coauthor_meta( 'ID' ), 'user_tw', true ) ) {
$twitter_username = get_user_meta( get_the_coauthor_meta( 'ID' ), 'user_tw', true);
?>
<a href="https://twitter.com/<?php echo $twitter_username; ?>" class="twitter-follow-button" data-show-count="false">Follow @<?php echo $twitter_username; ?></a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<?php } ?>
<?php if ($display_submitted): ?>
<div class="meta submitted">
<?php
if ($submitted) {
echo "Posted on " . date( "M. j, Y",$node->created);
}
?>
</div>
<?php endif; ?>