Community Forums › Forums › Archived Forums › Design Tips and Tricks › News Child – Remove Date in posts
Tagged: customize post info, News Theme
- This topic has 9 replies, 3 voices, and was last updated 10 years, 10 months ago by Anita.
-
AuthorPosts
-
May 27, 2013 at 10:03 am #42807LdyLarkeMember
How can I remove the date in posts on the News child theme? Just need to know where to make the edits?
I'd like to implement what was done in this article. Only show the date for posts 90 days old or less.
June 23, 2013 at 2:26 pm #47339RobGMemberHello in your function.php file you should see someting like this
/** Relocate the post info function */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post', 'genesis_post_info' );/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = ' [post_author_posts_link] [post_time] [post_comments] [post_edit]';
return $post_info;
}}You can just remove any element you don't want like [post_author_posts_link] [post_time] [post_comments] [post_edit]
You can also add them back to that file the same way you removed them. Hope this helps.
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossJune 24, 2013 at 9:07 am #47464LdyLarkeMemberThanks Rob, but I can't find any of that in the News functions.php file.
Any other ideas? C'mon people, this is a month old post now.
June 24, 2013 at 2:08 pm #47534RobGMemberHello Shannon it should be in your functions.php not News functions.php.
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossJune 24, 2013 at 6:49 pm #47586LdyLarkeMemberAre you saying I need to edit the core Genesis function.php file? Studiopress always says not to edit the core files, that's why I'm asking.
edit: never mind, I think I've got it sorted. 🙂
edit2: nope, this file has none of the code you quoted either.
path: /wp-includes/functions.php
nor /wp-content/themes/news
Now what?
June 25, 2013 at 3:45 am #47636RobGMemberHello Shannon you can edit that file right in your WordPress dashboard, Goto Appearance >Editor and on your right hand side you'll see all your files.. Just choose the functions.php and make the necessary changes.
To speed up the process please post the link to the website in question.
We recommend using Firebug to view source codes http://getfirebug.com/
RobGoss WordPress Developer
We build WordPress websites for your business or personal goals
http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgossJune 25, 2013 at 7:31 am #47644LdyLarkeMemberJune 26, 2013 at 6:45 pm #47905AnitaKeymaster@LdyLarke, you can use the Simple Edits plugin - http://wordpress.org/extend/plugins/genesis-simple-edits/ to accomplish this. You are correct, the News theme doesn't have the code Rob referred to so you need to actually add it to the bottom of your functions.php file.
//* Customize the post info function add_filter( 'genesis_post_info', 'post_info_filter' ); function post_info_filter($post_info) { if ( !is_page() ) { $post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]'; return $post_info; }}
Add the above but customize by removing the date, etc.
Love coffee, chocolate and my Bella!
June 26, 2013 at 9:13 pm #47952LdyLarkeMemberJune 27, 2013 at 6:02 am #47996AnitaKeymasterYou're welcome and I have Fibromyalgia too! Email me sometime if you want.
Love coffee, chocolate and my Bella!
-
AuthorPosts
- The topic ‘News Child – Remove Date in posts’ is closed to new replies.