Skip to content

Instantly share code, notes, and snippets.

@paaljoachim
Created September 17, 2014 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paaljoachim/d85c26bc2dbf1b5cb8b3 to your computer and use it in GitHub Desktop.
Save paaljoachim/d85c26bc2dbf1b5cb8b3 to your computer and use it in GitHub Desktop.
Customize the post meta function.
/* Customize the post meta function below the post AND remove it from category pages
http://wordpress.stackexchange.com/questions/50961/removing-post-meta-from-category-pages */
add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
function sp_post_meta_filter($post_meta) {
if ( !is_page() ) {
if (is_archive() ) $post_meta = '';
else $post_meta = '[post_categories before="Categories: "] [post_tags before="Tagged: "]';
return $post_meta;
}}
/* Adjust post meta in entry header AND change comments text in comments button
http://wpspeak.com/remove-post-date-in-genesis-framework/ */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
$post_info = '[post_date] By [post_author_posts_link] [post_comments zero="Add a Comment" one="1 Comment" more="% Comments"] [post_edit]';
return $post_info;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment