Skip to content

Instantly share code, notes, and snippets.

@studiopress
Last active November 15, 2016 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save studiopress/5700239 to your computer and use it in GitHub Desktop.
Save studiopress/5700239 to your computer and use it in GitHub Desktop.
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
Copy link

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