Created
March 26, 2012 22:34
-
-
Save danielbachhuber/2210295 to your computer and use it in GitHub Desktop.
Sample code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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