How stop the process of submitting a comment if a field is empty?

If you use wp-comments-post.php it would be better to customize comment_form by hook comment_form_default_fields, I don’t know why you create the new one. But as per of your functions you can handle it like this add_filter( ‘preprocess_comment’, ‘verify_comment_meta_data’, 1, 1 ); function verify_comment_meta_data( $commentdata ) { $commentdata[‘review_title’] = ( ! empty ( $_POST[‘review_title’] ) ) … Read more

Remove “Comment” column in all post-types

I got an alternative : This will not just hiding but disabling also function disable_comments() { $post_types = get_post_types(); foreach ($post_types as $post_type) { if(post_type_supports($post_type,’comments’)) { remove_post_type_support($post_type,’comments’); remove_post_type_support($post_type,’trackbacks’); } } } add_action(‘admin_init’,’disable_comments’);

Is there any way to override “break comments into pages” and “close comments for old posts” on certain posts, but not on others?

The option_{$option_name} filter can be used to modify the value of an option on the fly. Replace {$option_name} with the name of the option to be modified. Override Comment Pagination Option The option name for paginating comments is page_comments, so we’ll create a filter called option_page_comments. In the example below, we check if we’re looking … Read more

comments are coming on improper posts

It sounds to me like you mucked up the query and the comment form thinks the user’s on the wrong post. Try adding wp_reset_query(); to your theme right before your theme adds the comment form. If that doesn’t work, do this: wp_reset_query(); global $post, wp_query; $post = $wp_query->post; setup_postdata($post);

show un-approved comments at wordpress front end

Easy: function show_portfolio_comments( $post_ID ) { // NOT approved $comments_unapproved = get_comments( array( ‘status’ => ‘hold’, ‘post_id’ => $post_ID ) ); foreach ( $comments_unapproved as $comments) { if ( current_user_can( ‘edit_published_posts’ ) // maybe you’ll have to switch to some other cap { ?> <div class=”comment”> <h4>Unapproved Comments on your portfolio</h4> <div class=”comment-author”><?php echo $comment->comment_author; … Read more

How to hide “Comments are disabled”

Popup link takes five parameters. comments_popup_link(‘No Comments’,’One Comment’,’Many Comments’,’CSSclass’,’Comments Disabled’); So you are on to the correct solution. Now just change the above strings to whatever you want them to be for each # of comments. Finally change ‘Comments Disabled’ to just ”. Or perhaps ‘&nbsp;’ if it requires you to put something in there.

Why are my comments closed?

Have you tried go to “Posts” and checked the box next to the title and in the dropdown “Buld Actions” choose Edit and then apply, Comments and in the dropdown “Allow”. And also have added the screen in the post edit area on the tab in the header called “Screen Options” and checked the field … Read more

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