Last active
December 28, 2015 08:51
-
-
Save vividvilla/6199195 to your computer and use it in GitHub Desktop.
Remove Dates from Posts in Particular Category : Genesis Framework
This file contains hidden or 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 | |
//* Customize the entry meta in the entry header */ | |
add_filter( 'genesis_post_info', 'post_info_filter' ); | |
function post_info_filter($post_info) { | |
if( in_category( array('cat-1','cat-2') )) { | |
$post_info = 'Posted by [post_author_posts_link] [post_comments] [post_edit]'; | |
} | |
else { | |
$post_info = '[post_date] by [post_author] [post_comments] [post_edit]'; | |
} | |
return $post_info; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I added the code above to function.php but it didn't make a difference. Is this the only code that I have to add to function.php file? Thank you so much!