-
-
Save BeardedGinger/58e4dedf77ab313571501c0137d73ae6 to your computer and use it in GitHub Desktop.
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 | |
add_filter( 'genesis_post_info', 'lc_post_info' ); | |
/** | |
* Filter the Gensis post info to not include the "by" component if | |
* the post type does not support authors. | |
*/ | |
function lc_post_info() { | |
$post_type = get_post_type(); | |
if ( ! post_type_supports( $post_type, 'author' ) ) { | |
return '[post_date] [post_author_posts_link] [post_comments] [post_edit]'; | |
} else { | |
return '[post_date] ' . __( 'by', 'genesis' ) . ' [post_author_posts_link] [post_comments] [post_edit]'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment