Remove date from comments

Community Forums Forums General Discussion Remove date from comments

This topic is: not resolved

This topic contains 6 replies, has 3 voices, and was last updated by  Bill Murray 1 year, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #36474

    laura
    Participant
    Post count: 69

    Hi

    Does anyone know how to remove the date from each comment?

    I found a way of doing this by modifying comments.php, but since this is a Genesis Framework file and not a child theme file, I understand I should not be doing that.

    Is there a way to do this from the child theme’s functions.php?

    The code I found to do this in the comments.php is (I don’t know whether this would work as I am new to coding):

    <div class="comment-meta commentmetadata">
    <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'genesis' ), get_comment_date(), get_comment_time() ); ?></a>
    <?php edit_comment_link( __( 'Edit', 'genesis' ), g_ent( '• ' ), '' ); ?>
    </div><!-- end .comment-meta -->

     

    #36475

    Susan
    Moderator
    Post count: 7991

    Try this:

    Remove Date from Comments.


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #36477

    laura
    Participant
    Post count: 69

    @Susan – thx for your quick reply – it worked :)

    However, not the box around comments header cuts through the middle of the comments author’s gravatar.  Is there any way I can centre the gravatar and name of the author, and have the comments header box around that?

    Here’s a link to a post on my site http://momgoesonline.com/hello-world/

    #36478

    Susan
    Moderator
    Post count: 7991

    Look for this in your stylesheet:

    [css]
    .comment-author {
    background: #e5e5e5;
    font-size: 16px;
    font-weight: bold;
    padding: 8px 10px 0;
    }
    [/css]

    I believe if you change that last 0 to something around 22px, you should get the padding you are looking for.


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    • This reply was modified 1 year, 3 months ago by  Susan. Reason: *edited to correct incorrectly formatted CSS code
    • This reply was modified 1 year, 3 months ago by  Susan. Reason: edited to correct invalid css formatting
    • This reply was modified 1 year, 3 months ago by  Susan. Reason: *edited to correct incorrectly formatted CSS code
    • This reply was modified 1 year, 3 months ago by  Susan. Reason: edited to correct invalid css formatting
    #36509

    laura
    Participant
    Post count: 69

    22 was perfect – excellent eye!

    Is it possible to have the author name centred with the avatar image? (currently they seem to align at the top)? Or is that difficult to do?

    CHeers

    Laura

    #36545

    Susan
    Moderator
    Post count: 7991

    Glad the 22 worked out for you. :)

    As for the next question – I tried playing around with it using Firebug, but couldn’t immediately achieve what you are looking to do. Conceivably, I imagine  it is possible, but I don’t have an immediate suggestion.

    You might want to start another thread to ask that question, and have a fresh pair of eyes look at it.


    Susan @ Graphically Designing I’d love to customize your website! I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #36622

    Bill Murray
    Participant
    Post count: 572

    You can try this to center the text vertically on the image:

    1) Change the padding from padding: 8px 10px 22px to simply padding: 8px 10px;

    2) Add a styling rule of:

    .comment-author .vcard { line-height: 40px; }

    Hope that helps.


    Web: http://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

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

You must be logged in to reply to this topic.