Skip to content

Instantly share code, notes, and snippets.

@danielbachhuber
Created March 26, 2012 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielbachhuber/2210295 to your computer and use it in GitHub Desktop.
Save danielbachhuber/2210295 to your computer and use it in GitHub Desktop.
Sample code
<?php if ( function_exists( 'coauthors_posts_links' ) ) { ?>
<?php if ( $post_type->name != 'page' && $graphene_settings['hide_post_author'] != true ) : ?>
<p class="post-author author vcard">
<span class="fn nickname">
by <?php coauthors_posts_links(); ?>
</span>
</p>
<?php endif; ?>
<?php } else { ?>
<?php /* Post author, not shown if this is a Page post or if admin decides to hide it */ ?>
<?php if ( $post_type->name != 'page' && $graphene_settings['hide_post_author'] != true ) : ?>
<p class="post-author author vcard">
<?php
/* translators: this is for the author byline, such as 'by John Doe' */
$author_url = '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" class="url">' . get_the_author_meta( 'display_name' ) . '</a>';
printf( __( 'by %s', 'graphene' ), '<span class="fn nickname">' . $author_url . '</span>' );
?>
</p>
<?php endif; ?>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment