Prevent author from editing comments from others in their post

Try use the following code in your themes functions.php // http://scribu.net/wordpress/prevent-blog-authors-from-editing-comments.html function restrict_comment_editing( $caps, $cap, $user_id, $args ) { if ( ‘edit_comment’ == $cap ) { $comment = get_comment( $args[0] ); if ( $comment->user_id != $user_id ) $caps[] = ‘moderate_comments’; } return $caps; } add_filter( ‘map_meta_cap’, ‘restrict_comment_editing’, 10, 4 );

How to require users not to be logged in for comments on single page only?

Extremely not tested, based on overriding the global “users must login to comment” option (comment_registration) for a specific post function wpse208664_option_comment_registration($v) { if (is_single() && (get_the_ID() == your specific post ID)) $v = 0; return $v; } add_filter(‘option_comment_registration’, ‘wpse208664_option_comment_registration’);

Allowing comments on author pages

Please have a look here: https://codex.wordpress.org/Function_Reference/comment_form unless I’m mistaken, you will need to add this to your author.php file. If your using a theme that gets updated your will have to make a plugin out of it. <?php comment_form( $args, $post_id ); ?>

Admin – Dashboard – Unset recent comments

The recent comments list is part of the Activity Dashboard Widget. Approach #1 We could remove that dashboard widget and then add our modified version of it: /** * Remove the latest comments from the Activity dashboard widget (approach #1) */ add_action( ‘wp_dashboard_setup’, function() { // Remove the Activity widget remove_meta_box( ‘dashboard_activity’, ‘dashboard’, ‘normal’ ); … Read more

How Can I display the Current Logged-In User’s Comment at the Top of the Comments Section in WordPress?

Alright, I figured it out. Thanks for all the direction everyone! <?php global $current_user,$post; $args = array(‘user_id’ => $current_user->ID,’post_id’ => $post->ID); // The Query $comments_query = new WP_Comment_Query; $comments = $comments_query->query( $args ); // Comment Loop if ( $comments ) { foreach ( $comments as $comment ) { echo ‘<p>’ . $comment->comment_content . ‘</p>’; } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)