Site logo

[Support request] How to Highlight Contributor and Administrator Comment in Posts

Home Forums Support [Support request] How to Highlight Contributor and Administrator Comment in Posts

Home Forums Support How to Highlight Contributor and Administrator Comment in Posts

Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #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 bypostauthor class not appear. GeneratePress theme uses the default WordPress comment template. As you can see here, if the Comment author is the Post author, a class bypostauthor should be added. https://github.com/WordPress/WordPress/blob/cf9793f0dfaf5a9565302690566007cf65389e8d/wp-includes/comment-template.php#:~:text=%24classes%5B%5D%20%3D%20%27bypostauthor%27%3B

    Yours 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/

    #2475454
    Ravi Saive

    Hi Fernando,

    I’ve managed to create a staging site for you to test out and fix the issue…

    #2475592
    Ravi Saive

    Any update?

    #2476046
    Leo
    Staff
    Customer Support

    It 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-2475430

    You 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/

    #2476413
    Ravi 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…

    #2476427
    Fernando
    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/

    #2476522
    Ravi Saive

    @Fernando,

    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 bypostauthor tag is missing…

    Whereas, if an author login to the WP dashboard and created a post, and publishes itself, then the bypostauthor tag 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 bypostauthor tag added to these previous published articles?

    #2476538
    Fernando
    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/

    #2476541
    Ravi Saive

    @Fernando,

    I have created a topic at the WP forum as suggested by you, let’s wait and see…

    #2476547
    Fernando
    Customer Support

    Alright! Hope there’s a solution!

Viewing 10 posts - 16 through 25 (of 25 total)
  • You must be logged in to reply to this topic.