Load comments per post on click with AJAX

Aha, I think my syntax was wrong. I changed: action: ‘do_ajax’, data: { ‘post_id’ : ’72’ //using a post id that I *know* has comments, for testing! }, to: data: { ‘action’ : ‘do_ajax’, ‘post_id’ : ’72’ }, and I’m getting the correct response from the console.log which shows: [{“comment_ID”:”1″,”comment_post_ID”:”1″,”comment_author”:”Mr WordPress”,”comment_author_email”:””,”comment_author_url”:”http:\/\/wordpress.org\/”,”comment_author_IP”:””,”comment_date”:”2012-08-28 19:55:20″,”comment_date_gmt”:”2012-08-28 19:55:20″,”comment_content”:”Hi, this is … Read more

How can I change the link in comment form “Log in to post a comment”?

the link is called from within comment_form() (/wp-includes/comment-template.php line 1539) : ‘must_log_in’ => ‘<p class=”must-log-in”>’ . sprintf( __( ‘You must be <a href=”https://wordpress.stackexchange.com/questions/71100/%s”>logged in</a> to post a comment.’ ), wp_login_url( apply_filters( ‘the_permalink’, get_permalink( $post_id ) ) ) ) . ‘</p>’, and uses wp_login_url() (/wp-includes/general-template.php lines 224+) which uses a filter on its return: return apply_filters(‘login_url’, … Read more

How to get comments from multiple post type?

It looks like WP_Comment_Query() only supports a single post type. You can adjust it, by using the comments_clauses filter. Try for example: $defaults = array( ‘number’ => 5, ‘post_type’ => array( ‘post’,’authors’,’movies’ ), ); add_filter( ‘comments_clauses’, ‘wpse_121051’, 10, 2 ); $comments = get_comments($defaults) where /** * Support for multiple post types for comments * * … Read more

Comments Pagination as an unordered list

As paginate_comments_links() is pretty much just a already customized version for comments of paginate_links(), see the documentation for a deeper insight, you can use the parameter type for this. paginate_comments_links( array( ‘type’ => ‘list’ ) );

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