Site logo

Archived topic

Move comment-metadata to right side of comment-author

7 replies · Started by Rogi on January 23, 2022

Viewing posts 1–8 of 8

Hi there!

Is there a way to remove the .comment-metadata class from the generate_after_comment_author_name hook and place it on the right side of the .comment-author class?

Thank you in advance!

Hi Igor,

That class is hardcoded to the theme, unfortunately.
See it here - https://github.com/tomusborne/generatepress/blob/adfe090929b0515cdf894f4c6b722cfe8c0790dc/inc/structure/comments.php#L56

If you must remove it, you may have to go w/ Javascript.

Any particular reason why you want the class removed? it can be ignored if you don't want to use it. It shouldn't affect the appearance unless you want to override it's specific CSS. That can be done w/ custom CSS. :D

and place it on the right side of the .comment-author class?

Are you only trying to move the class or are you trying to move the entire element? Moving just the class can have none to minimal styling effect.

If you can tell us the purpose of this, perhaps we can advise you on a different path to take. :D

Hi Elvin!

On the frontend I want the date and time to be displayed on the right side of the author on the same line. And I want me to be able to edit the comment-metadata class separately from the comment-author class.
My site doesn't use gravatar in the comments.

Igor

Hi there,

can you share a link to a post with comments on your site so i can see what you have so far ?

Hi David!

My site is still under construction (locked to non-logged-in users).

Below are two screens of the comments area. The first screen shows the current format and the second screen the format I want.

I believe this should be CSS applicable though:

.comment-author-info{
display: flex;
flex-direction: row;
}

This should be effective as comment-metadata and comment-author are siblings within comment-author-info

If it doesn't work, can you provide us backend access to at least see what this page looks like on the page-source? to verify a few things.

You can use the private information text field to provide the details.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

It worked!

Thank you very much!

Nice one. No problem. :D

This archived topic is closed to new replies.