How to Customize Post Info in Genesis

This tutorial shows how to make changes to post info or entry meta before content in Genesis using the genesis_post_meta filter.

Add the following in child theme’s functions.php:

add_filter( 'genesis_post_info', 'custom_genesis_post_info' );
/**
* Customize Post Info (Entry Meta Before Content).
*/
function custom_genesis_post_info( $post_meta ) {
 
return sprintf( '[post_date] %s [post_author_posts_link] [post_comments] [post_edit]', __( 'by', 'genesis-sample' ) );
 
}

and edit the return line inside the function as needed.

For example, to delete post comments, you would change it to:

return sprintf( '[post_date] %s [post_author_posts_link] [post_edit]', __( 'by', 'genesis-sample' ) );
This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.