Remove post date from Ambience Pro theme

Community Forums Forums General Discussion Remove post date from Ambience Pro theme

This topic is: not resolved

This topic contains 8 replies, has 4 voices, and was last updated by  essaysnark 3 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #115552

    braderz31
    Member
    Post count: 15

    Hi 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

    #115565

    cwalsh
    Participant
    Post count: 84

    Try 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

    #115566

    Kellylise
    Participant
    Post count: 444
    #115568

    braderz31
    Member
    Post count: 15

    Hi

    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

    #115570

    braderz31
    Member
    Post count: 15

    Ah the plugin – thank you.

    I’ll try that

    #115575

    braderz31
    Member
    Post count: 15

    I’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

    #115581

    braderz31
    Member
    Post count: 15

    Just 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 :-(

    #115591

    braderz31
    Member
    Post count: 15

    It 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

    #115654

    essaysnark
    Participant
    Post count: 342

    The 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:

    http://wpsites.net/web-design/modify-post-info-genesis/

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.