Metro Theme: Removing "Post Comment" button from Featured Post

Community Forums Forums General Discussion Metro Theme: Removing "Post Comment" button from Featured Post

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  Stewart 1 year, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #52542

    religionforbreakfast
    Participant
    Post count: 6

    Hi there. Is there a way to remove the blue “comment” button that you can see floating under my post title in my Featured Post widget? I only want to remove it from the homepage though. When clicking on the post, I would like the comment button to still be functional. Thank you so much!

    ~Andrew

    http://religionforbreakfast.com/

    #52570

    Stewart
    Participant
    Post count: 156

    Hi Andrew,

    Currently not at home so can’t test this but it should work just fine:

    [php]
    //* Customize the post info function for homepage only
    add_filter( ‘genesis_post_info’, ‘sc_post_info_filter’ );
    function sc_post_info_filter($post_info) {
    if ( is_home() ) {
    $post_info = ‘[post_date] by [post_author_posts_link] [post_edit]‘;
    return $post_info;
    }
    }
    [/php]

    Add the above code to your child themes function.php.

    Hope this helps
    Stewart


    WordPress Developer – Need help upgrading to Genesis 2.0?My Blog
    Follow me on Twitter

    #52586

    religionforbreakfast
    Participant
    Post count: 6

    Stewart,

    Thanks so much for responding. I’m having trouble making this work though. I’m using Chrome, and it says “server error” whenever I reload the site after implementing the code in the child theme’s function.php. Any thoughts? Thanks so much again!

    ~Andrew

    #52587

    Stewart
    Participant
    Post count: 156

    Your welcome Andrew,

    The make sure you don’t place it within any other functions and before “?>” if it is present. If you still can’t get it to work you could try this plugin Genesis Simple Edits.

    Genesis Simple Edits is a lightweight plugin by the guys at studiopress which will achieve the same thing :)

    Hope this helps
    Stewart


    WordPress Developer – Need help upgrading to Genesis 2.0?My Blog
    Follow me on Twitter

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

You must be logged in to reply to this topic.