Viewing 7 replies - 1 through 7 (of 7 total)
  • Exactly what you do depends on your theme. If it is a freely available theme, post a link to your site so we can see the code so we can help .
    You can remove the date easily editing the CSS of your theme.

    Thread Starter v123shine

    (@v123shine)

    Yes, I know how to hide time using css code. I can use display:none. But that not possible, because if I hide the time, date also hidden too.

    This is the css code:

    <div class="comment-meta commentmetadata"><a href="#comment-3103">September 11, 2015 at 2:37 am</a></div>

    Do you know filter to remove time in comment using functions.php

    Regards,
    Shine

    i dont know any filter but you can remove the date from wp-core if you dont need that and have access on ftp
    what you must change is located in wp-includes/comment-template.php

    at line 1986, change this <?php printf( _x( '%1$s at %2$s', '1: date, 2: time' ), get_comment_date(), get_comment_time() ); ?>

    with
    <?php printf( get_comment_date() ); ?>

    after you will see something like this

    Look out when your wordpress version will update maybe you must change again that line of code, for this reason is a bad idea to change core files

    Thread Starter v123shine

    (@v123shine)

    Many thanks Zota Marius for the alternative solution.

    Anyone in here can help me, please!

    Regards,
    Shine

    Thread Starter v123shine

    (@v123shine)

    Sorry!

    How to filter/remove time in comment using functions.php

    Anyone in here can help me, please!

    Regards,
    Shine

    with this in function.php i think you will remove the time but will remain the word “at”;

    add_filter('get_comment_time','time_remove');
    function time_remove( ) {
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to remove time in comment?’ is closed to new replies.