How do I really disable comments?

There is no need for a plugin. The reason people get this confused is because posts can have comments enabled or disabled on an individual basis. There is no “global” option, because it’s per post. So really, it just takes two main steps to disable comments in WordPress: Settings > Discussion. Turn off both “Allow … Read more

How to create a link to jump to “Leave a comment” part?

The code below should be something similar to what you’re looking for Inside the loop template you use for listing blogs (like index.php) you need something like this <a href=”<?php the_permalink(); ?>/#respond”> <!– The blog permalink with the anchor ID after –> <i class=”fa fa-comments-o”></i> Leave a Comment </a> Inside your comments.php file you could … Read more

Comment_Reply_Link Not Showing?

My suggestion would be twofold: Ensure you are properly enqueueing the comment-reply script Replace your hard-coded comment list with wp_list_comments() Enqueueing comment-reply I would recommend hooking into comment_form_before(): function wpse71451_enqueue_comment_reply() { if ( get_option( ‘thread_comments’ ) ) { wp_enqueue_script( ‘comment-reply’ ); } } // Hook into comment_form_before add_action( ‘comment_form_before’, ‘wpse71451_enqueue_comment_reply’ ); Outputting the comment list … Read more

Retrieve comments from current post using SQL

Send your post id in the function and it will look something like this <?php function dp_recent_comments_ajax($ID) { $no_comments = 5; $comment_len = 300; global $wpdb; $request = “SELECT * FROM $wpdb->comments”; $request .= ” JOIN $wpdb->posts ON ID = comment_post_ID”; $request .= ” WHERE comment_approved = ‘1’ AND post_status=”publish” AND post_password =””; $request .= … Read more

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