Community Forums › Forums › Archived Forums › Design Tips and Tricks › Remove post date
Tagged: remove date on post
- This topic has 8 replies, 5 voices, and was last updated 13 years, 1 month ago by
rfmeier.
-
AuthorPosts
-
June 13, 2013 at 5:28 pm #45775
Herman
ParticipantHow do I remove "posted on" at the top of every post in focus theme without modifying genesis framework files?
I'd like the posts to be evergreen.
http://kneejointpainremedy.com/June 13, 2013 at 6:12 pm #45784rfmeier
MemberHello,
Within your functions.php file, do you have code that begins with add_filter( 'genesis_post_info' ?
June 14, 2013 at 12:07 am #45819vividvilla
MemberAdd this code in functions.php
/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if (!is_page()) {
$post_info = 'Written by [post_author_posts_link] [post_comments] [post_edit]';
return $post_info;
}
}
Vivek R – @vividvilla
Genesis Child Theme Designer and Blogger at WPStuffs.
For affordable Genesis Child Theme design and Customization Contact me hereJune 14, 2013 at 5:35 am #45842Herman
ParticipantVividvilla ..I got a fatal error after adding the code
Fatal error: Cannot redeclare post_info_filter() (previously declared in /home/kneejoin/public_html/wp-content/themes/focus/functions.php:17) in /home/kneejoin/public_html/wp-content/themes/focus/functions.php on line 65
rfmeier - I don't see that code
Thanks
June 14, 2013 at 5:51 am #45850pxforti
ParticipantChange the name of the function: eg,
add_filter( ‘genesis_post_info’, ‘post_info_custom_filter’ );
function post_info_custom_filter($post_info) {
if (!is_page()) {
$post_info = ‘Written by [post_author_posts_link] [post_comments] [post_edit]‘;
return $post_info;
}
}
writeNowDesign
WordPress and Ecommerce Website DesignJune 14, 2013 at 5:56 am #45851Brad Dalton
ParticipantYou may be interested in this Herman http://www.wpbeginner.com/opinion/why-you-should-not-remove-dates-from-your-wordpress-blog-posts/
June 14, 2013 at 6:22 am #45856rfmeier
MemberAside from Brad's advice (which is what I would follow), the error: 'Cannot redeclare post_info_filter()' means it is already defined within your functions file, so you just have to look for that function.
If you really wanted to remove the date, find the [post_date] within the post_info_filter function and that will remove [post_date] from the string.
June 14, 2013 at 8:55 am #45906Herman
ParticipantBrad thanks for the advice..after reading your article I think I'll create a resources page instead and leave the post dates as is.
Ryan..appreciate your input especially from another runner:-) although I only run 3 miles/day.
June 14, 2013 at 9:02 am #45910rfmeier
Member -
AuthorPosts
- The topic ‘Remove post date’ is closed to new replies.