- This topic has 24 replies, 3 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
December 28, 2022 at 1:14 am #2475430
Fernando Customer Support
Alright. I understand.
In any case, this shouldn’t be a theme-related issue. There’s no code in GeneratePress that should make the
bypostauthorclass not appear. GeneratePress theme uses the default WordPress comment template. As you can see here, if the Comment author is the Post author, a classbypostauthorshould be added. https://github.com/WordPress/WordPress/blob/cf9793f0dfaf5a9565302690566007cf65389e8d/wp-includes/comment-template.php#:~:text=%24classes%5B%5D%20%3D%20%27bypostauthor%27%3BYours isn’t adding that. I presumed it’s caused by a plugin but since it isn’t, it may be a PHP code or something else. You’ll need to double-check if the comment author is indeed the post author. If it is, you’ll need to disable everything external to find the cause of the issue. Starting from plugins to custom codes.
If you’re using a Child theme, try using the parent theme as well to test. Make a new comment on every test to check.
It would be good to ask here as well: https://wordpress.org/support/forum/wp-advanced/
December 28, 2022 at 1:50 am #2475454Ravi Saive
Hi Fernando,
I’ve managed to create a staging site for you to test out and fix the issue…
December 28, 2022 at 5:01 am #2475592Ravi Saive
Any update?
December 28, 2022 at 11:53 am #2476046Leo
StaffCustomer SupportIt doesn’t look like Fernando requested a staging site login.
This isn’t a theme-related issue so it’s not something we can help to debug.
Have you tried his debugging suggestions in the previous reply?
https://generatepress.com/forums/topic/how-to-highlight-contributor-and-administrator-comment-in-posts/page/2/#post-2475430You would basically need to go through #1 here and if that doesn’t work, try #4 in the same article:
https://docs.generatepress.com/article/debugging-tips/December 28, 2022 at 9:41 pm #2476413Ravi Saive
@Leo,
Fernando asked me to give staging login details, see this comment – https://generatepress.com/forums/topic/how-to-highlight-contributor-and-administrator-comment-in-posts/#post-2475406
It is a theme-related issue might be because I am using the same theme on two sites and have the same problem on both sites. Also, I have not made any changes or modifications to the theme PHP files, I just added some custom CSS that too from the customizer section…
I have tried all the debugging suggestions, but no luck… Could you please help me out…
December 28, 2022 at 10:02 pm #2476427Fernando Customer Support
As mentioned by Leo, this shouldn’t be a theme-related issue. It should be the default WordPress behavior. There’s no code in GeneratePress that should cause this not to work or alter its behavior. This is actually the first time I’ve seen this issue on a GP site as well.
It may be good to raise a topic here instead: https://wordpress.org/support/forum/wp-advanced/
You can try using a different WordPress theme to confirm if it is indeed a theme-related issue. Check #4 here: https://docs.generatepress.com/article/debugging-tips/
December 29, 2022 at 12:05 am #2476522Ravi Saive
I managed to trace the issue, the problem is when a new article is created and published by the WP Admin user and then later assigned to the actual author via the Quick Edit –> Author tab – the
bypostauthortag is missing…Whereas, if an author login to the WP dashboard and created a post, and publishes itself, then the
bypostauthortag is added automatically…See the link in the private tab, where you can see the comments of the Author and Admin highlighted with a badge…
Now the question is, all my previous articles are created and published by the WP Admin account, and later assigned to the Author. Now how do I make the
bypostauthortag added to these previous published articles?December 29, 2022 at 12:33 am #2476538Fernando Customer Support
I see. Glad you found the cause!
I’m not sure if that’s possible though. You might want to ask for suggestions for that here as well: https://wordpress.org/support/forum/wp-advanced/
December 29, 2022 at 12:38 am #2476541Ravi Saive
I have created a topic at the WP forum as suggested by you, let’s wait and see…
December 29, 2022 at 12:48 am #2476547Fernando Customer Support
Alright! Hope there’s a solution!
-
AuthorPosts
- You must be logged in to reply to this topic.