• Resolved Bonesnap

    (@bonesnap)


    Hello all!

    I’m having an issue removing comments in the admin back-end of WordPress. The comments are being added through some custom code using the wp_insert_comment function. I’ve read the documentation on the function but it doesn’t really give that much information.

    I can see the comments in the admin area but they don’t have checkboxes next to them, so I can’t select them to remove or edit them.

    Other information: the comments are being added with the comment_approved value of 1.

    I haven’t checked the bug tracker yet. Is this a bug?

    Any help or insight would be appreciated. Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The comments are being added through some custom code using the wp_insert_comment function.

    How do you know?

    Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Eleven theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    Thread Starter Bonesnap

    (@bonesnap)

    I know because I wrote the code. Sorry, I should have prefaced this by saying I am a PHP programmer and work on WordPress sites quite a bit.

    – There are no plugins except one I created but it has nothing to do with comments.

    – I used the Twenty Eleven theme as a base and then modify it to what I need.

    – I’m confident that is not the issue.

    The code that does the insert is:

    $result = wp_insert_comment(array('comment_post_ID'	=> 0,
    				   'user_id'			=> $id,
    				'comment_content'	=> $message,
    				'comment_karma'		=> 4,								   'comment_author_IP'	=> $_SERVER['REMOTE_ADDR'],
    'comment_date'		=> date('Y-m-d H:i:s'),
    'comment_approved'	=> '1'));

    Wow trying to format code here is a challenge.

    Thread Starter Bonesnap

    (@bonesnap)

    Okay well I managed to get the checkboxes to appear as well as the other moderating options.

    At least one comment has to have its comment_post_ID field linking to a published post. The comments will appear, but you can’t do anything with them.

    I should note that I am not using the comment system for its traditional purpose and instead leveraging it for something else (still comment-related, though) that doesn’t involve blog posts or pages.

    In any case, I suppose this thread is solved. Thanks for the reply!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Comments in the admin back-end don't have checkboxes’ is closed to new replies.