[Resolved] Removing date & time from comments

Home Forums Support [Resolved] Removing date & time from comments

Home Forums Support Removing date & time from comments

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

    How do I remove date and time from comments? also when i reply to people as a comment it says my name is ADMIN can i change it?

    thanks in advance.

    #30341
    Tom
    Lead Developer
    Lead Developer

    Hi Mike,

    This CSS should remove the date from comments:

    .comment-metadata a {
          display: none;
    }
    
    .comment-metadata .reply {
          color: transparent;
    }
    
    .comment-metadata .reply a {
          display: inline-block;
    }

    Let me know if that works or not.

    As for your name, if you go to “Users > Your Profile”, you can edit the name that’s displayed publicly.

    #30838
    mike

    Tom.

    It worked thank you sooo much! you guys are great!!!

    #136009
    Sha

    Hi Tom,

    How about removing it entirely from your page. removing it for user as well as for search engine.

    Regards

    #136058
    Tom
    Lead Developer
    Lead Developer
    #249808
    Ahamed

    Hi,

    I tried this css,

    .comment-metadata a {
    display: none;
    }

    .comment-metadata .reply {
    color: transparent;
    }

    .comment-metadata .reply a {
    display: inline-block;
    }

    [IMG]http://i64.tinypic.com/2vvjpsl.png[/IMG]

    [IMG]http://i65.tinypic.com/qp5aj6.png[/IMG]

    See the images.

    How can i take out the timestamp and the additional |

    Even if i log out from admin,
    it still appears weirdly.

    [IMG]http://i65.tinypic.com/2q9xque.png[/IMG]

    #249826
    Tom
    Lead Developer
    Lead Developer

    Hmm, unfortunately to do that you would need to overwrite the entire comments function: https://github.com/tomusborne/generatepress/blob/1.3.40/inc/template-tags.php#L110-L169

    Adding that function to your child theme/custom plugin/Code Snippets plugin (including the function_exists wrapper) will allow you to make changes to it.

    #249849
    Ahamed

    Hi,

    So you are saying it is not possible to remove the comment metadata fully.
    and maybe just place the edit/reply button beneath the comment?

    Like this,
    [IMG]http://i63.tinypic.com/25zl8nt.png[/IMG]

    Regards

    #250025
    Tom
    Lead Developer
    Lead Developer

    By overwriting the generate_comment() function, you can remove/add/change whatever you like.

    So you would paste that entire function highlighted into your child theme functions.php/custom plugin/Code Snippets plugin, then make your adjustments.

    That way you can remove the bar: https://github.com/tomusborne/generatepress/blob/1.3.40/inc/template-tags.php#L144

    And the time stamp: https://github.com/tomusborne/generatepress/blob/1.3.40/inc/template-tags.php#L141

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.