public
Created

Sample code

  • Download Gist
gistfile1.aw
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
<?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 } ?>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.