• Hi, I need to disable the ability to comment for the post author in his posts but not in the others.
    Is it possibile? How can I do?

    • This topic was modified 4 years, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t know if there’s a plug-in for this usage, but it is possible…

    You need check the author of comment and compare it with the id of article, if same, the comment should be deleted on the fly.

    Something looklike that:

    
    $user = get_comment_author( get_comment( comment_ID() ) );
    if ($user == get_the_author_meta('ID') )
    {
    wp_die('You can NOT comment in your own article!');}
    

    It’s not a true code, you need some coding in a custom plugin.

    Thread Starter emmepi1986

    (@emmepi1986)

    If I don’t find a plugin, where I put this code?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable the ability to comment for post author’ is closed to new replies.