Genesis post info.
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Customize the post info function | |
add_filter( 'genesis_post_info', 'sp_post_info_filter' ); | |
function sp_post_info_filter($post_info) { | |
if ( !is_page() ) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]'; | |
return $post_info; | |
}} |
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
/* Post Info | |
------------------------------------------------------------ */ | |
.post-info { | |
border-bottom: 1px solid #ddd; | |
font-size: 14px; | |
margin: 0 0 20px; | |
padding: 0 0 5px; | |
} |
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 | |
//* Do NOT include the opening php tag shown above. Copy the code shown below. | |
//* Remove the post info function | |
remove_action( 'genesis_before_post_content', 'genesis_post_info' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This just wasted 15 minutes of my life. The right way is to make sure the filter priority is higher than default. Example:
add_filter( 'genesis_post_info', 'sp_post_info_filter', 999 );