Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Genesis post info.
<?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;
}}
/* Post Info
------------------------------------------------------------ */
.post-info {
border-bottom: 1px solid #ddd;
font-size: 14px;
margin: 0 0 20px;
padding: 0 0 5px;
}
<?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' );
@sorincoza

This comment has been minimized.

Copy link

@sorincoza sorincoza commented Nov 15, 2016

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 );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment