Modify :Leave a Comment" on blog page

Community Forums Forums Design Tips and Tricks Modify :Leave a Comment" on blog page

This topic is: not resolved

This topic contains 1 reply, has 1 voice, and was last updated by  tomf2468 1 year, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22434

    tomf2468
    Participant
    Post count: 1

    Corporate theme, Home/Blog pages. I would line to remove the “Leave A Comment” and icon to its left (talk bubble) when there are no comments (it changes to the “1 Comment and icon if comment is make). When no comments made you would see nothing, if a comment is made you see icon and text. I do want the date and author that normally comes to the left of this to be visible in all conditions.

     

    I tried the snipped at http://my.studiopress.com/snippets/comments/#comments-link (Below is the code to modify the comments link on your site) by putting either nothing or a & nbsp ; in the zero section and that removes the date and author that normally comes to the left of this.

     

    Any help appreciated.

    #22479

    tomf2468
    Participant
    Post count: 1

    A bit of Googling got me most of what I need, I added this to the corporate functions.php :

    add_filter( ‘genesis_post_info’, ‘post_info_filter’ );
    function post_info_filter( $post_info ) {
    return ‘[post_date] by [post_author_posts_link] [post_comments zero=" " one="1 Comment" more="% Comments"] [post_edit]‘;
    }

    That seems to be the same logic as the snippet I mentioned above, but modified with the corporate theme’s fields (date and author added in). What that doesn’t do is turn the talk bubble icon off when there are no comments. Since that seems to be set in the child theme’s css, I may be “out of luck”….

    Any suggestions are welcome!

     

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

You must be logged in to reply to this topic.