Community Forums › Forums › Archived Forums › General Discussion › Remove post date from Ambience Pro theme
Tagged: Ambience Pro, post-date
- This topic has 8 replies, 4 voices, and was last updated 10 years, 6 months ago by
essaysnark.
-
AuthorPosts
-
July 23, 2014 at 1:07 pm #115552
braderz31
MemberHi there
I'm trying to figure out how to remove the post date from the featured images on the homepage and the main posts themselves.
I've had a look through theme files and can't work out how to do this.
Any suggestions are greatly appreciated
Thanks
Brad
July 23, 2014 at 1:59 pm #115565cwalsh
MemberTry adding this to your stylesheet
.entry-time { display: none; }
Need website customization services or other help? Caley @ PixelPerfect Design Studio | Connect with me on Twitter: @pixelsperfect | Like me on Facebook: https://www.facebook.com/PixelPerfectDesignStudio
July 23, 2014 at 2:00 pm #115566DTHkelly
MemberHave you seen this?
http://wordpress.org/plugins/genesis-simple-edits/July 23, 2014 at 2:01 pm #115568braderz31
MemberHi
Thanks for your reply but ideally I want to remove the markup completely (just for cleanliness) rather than hiding it from the browser with css.
I guess I just need a function so I better go and find the genesis functions and hooks that are available.
Thanks
Brad
July 23, 2014 at 2:03 pm #115570braderz31
MemberAh the plugin - thank you.
I'll try that
July 23, 2014 at 2:25 pm #115575braderz31
MemberI've just found this code from the studiopress code snippets but it doesn't seem to work
//* Remove the post info function remove_action( 'genesis_before_post_content', 'genesis_post_info' );
any ideas what else to try?
If I have to resort to the plugin I will
Thanks
Brad
July 23, 2014 at 2:37 pm #115581braderz31
MemberJust for info - I installed the plugin and it only allows you to remove post info from the post itself and not on the homepage featured image 🙁
July 23, 2014 at 3:10 pm #115591braderz31
MemberIt was a bit of a hack and I'm not entirely content with it but I've achieved the desired result.
I ended up using the CSS mentioned above to remove the time and date for the featured posts on the homepage.
Then for the individual posts page I had to amend this function in the functions.php file:
//* Customize the entry meta in the entry header add_filter( 'genesis_post_info', 'ambiance_single_post_info_filter' ); function ambiance_single_post_info_filter( $post_info ) { $post_info = '[post_date] [post_author_posts_link] [post_comments] [post_edit]'; return $post_info; }
I amended it to this
//* Customize the entry meta in the entry header add_filter( 'genesis_post_info', 'ambiance_single_post_info_filter' ); function ambiance_single_post_info_filter( $post_info ) { $post_info = ''; return $post_info; }
If anyone knows of a cleaner way to do this, I'd be very grateful
Thanks
Brad
July 23, 2014 at 11:16 pm #115654essaysnark
ParticipantThe remove_action snippet you originally tried is for XHTML themes. If your theme is HTML5 then it won't work. You could try this one instead:
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
If you want that just for the posts on the home page then you'll need to implement it with a conditional check. Brad Dalton covers lots of cases here:
4 Ways To Remove, Hide or Customize Specific Post Info Links in Genesis
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.