Adding comments section to website integrated WordPress instance

Could be as simple as using the full function in the template file: <?php comments_template( ”, true ); ?> Be sure you have a comments.php file in the theme folder. And be sure you’re using the full loop: <?php require(‘/the/path/to/your/wp-blog-header.php’); ?> <?php $posts = get_posts(‘numberposts=10&order=ASC&orderby=post_title’); foreach ($posts as $post) : setup_postdata( $post ); ?> <?php … Read more

counting trackbacks, pingbacks and comments of a post

I think you can use get_comments. In the type parameter you can pass the type of comment (trackback, ping), you can filter by status, and you have a parameter called count, that when is set to true returns just the number of comments that match the parameters you passed. get_comments( array( ‘status’ => ‘approve’, ‘post_id’=> … Read more

Two textareas showing up in comments.php

I found out why the two textareas were showing up: The comment_field is not supposed to be in the ‘fields’ array because it is a distinct parameter for the comment_form() function. It should be: ‘url’ => ‘<div class=”grid-1-3″>’ . ‘<input id=”url” placeholder=”Website (optional)” name=”url” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author_url’] ) . ‘” size=”30″ /></div>’, )), … Read more

get only one last comment from each post

Constructing the SQL query: You can try the following: /** * Fetch comments’ IDs for the most recently commented posts * (only one comment per post) * * @param integer $count * @return array */ function get_cids_wpse ( $count = 5 ) { global $wpdb; $sql = “SELECT MAX( comment_ID ) as cid FROM {$wpdb->comments} … Read more

How to wrap comment_form $fields in one div?

The hook you’re using is correct, however, you don’t need to bloat it out so much. This simpler version will do exactly what you’re looking for, with much less lines. function wpse172052_comment_form_before_fields() { echo ‘<div class=”row”>’; } add_action(‘comment_form_before_fields’, ‘wpse172052_comment_form_before_fields’); function wpse172052_comment_form_after_fields() { echo ‘</div>’; } add_action(‘comment_form_after_fields’, ‘wpse172052_comment_form_after_fields’);

Can’t reply to comments [closed]

Try this Solution.This will surely helps you. Replace your wp-includes and wp-admin folder with WordPress’s core folder from WordPress package. May be you have problem with uploading these two folders and this may lead you that problem.

How do comments work?

Well, that “link back” might be a Trackback or Pingback. It´s a function to inform other blogs that you have “used”, mentioned or linked to their content. It´s made for connecting blogs with each other. Some themes show Track-/Pingbacks in the comment section, some don´t. Anyway, if you want to disable them, you can do … Read more