Replace do_action() with a normal submit form in comments.php
Try this: <?php comment_form(); ?> References: Function Reference for comment_form(); on WordPress Codex comment_form(); WordPress function reference, arguments and source at QueryPosts
Try this: <?php comment_form(); ?> References: Function Reference for comment_form(); on WordPress Codex comment_form(); WordPress function reference, arguments and source at QueryPosts
your query doesn’t restrict posts without comments. $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts( ‘cat=-8378, -13444&orderby=comment_count&paged=’ . $paged ); while (have_posts()) : if( get_comments_number() ) the_post(); […] reference: get_comments_number()
I’m using the “comments_template()” function with no additional parameters, which loads the default “comments.php” from the wp-includes library. That’s your problem. The compat version is unmaintained and obsolete. Theme-compat files are officially no longer supported, as of WordPress 3.0. (See here.) You need to define and include comments.php in your Theme.
On the bottom of comments.php I use the following code: <?php comment_form(array(‘comment_field’ => ‘<p class=”comment-form-comment”><label for=”comment”>Comment</label><textarea id=”comment” name=”comment” cols=”45″ rows=”8″ aria-required=”true”></textarea></p>’, ‘comment_notes_before’ => ‘<p class=”comment-notes”>Your email address will not be published. Required fields are marked *</p>’, ‘comment_notes_after’ => ”, ‘title_reply’ => ‘Leave a Reply’, ‘title_reply_to’ => ‘Leave a Reply to %s’, ‘label_submit’ => ‘Post comment’, … Read more
You could use get_comments() instead. The code in this forum post gives an example of how you’d do that: <?php $recent_comments = get_comments( array(‘post_id’ => $newest_post_id,) ); foreach ($recent_comments as $comment) { ?> <?php $comment_id = get_comment($comment->comment_ID); $author = $comment_id->comment_author; $commentdate = $comment_id->comment_date; $content = $comment_id->comment_content; ?> <p><?php echo $author; echo $commentdate;?></p> <p><?php echo $content;?></p> … Read more
Ok, so this is what I’ve done. If anybody has a better idea I will leave the answer open for a few hours and choose it! <?php if($comments) : ?> <ol> <?php foreach($comments as $comment) : ?> <li id=”comment-<?php comment_ID(); ?>”> <?php if ($comment->comment_approved == ‘0’) : ?> <p>Your comment is awaiting approval</p> <?php endif; … Read more
Your format looks a bit off to me. I’d try it more like this: <?php $fields = array( ‘author’ => ‘<p><label for=”author”><span class=”req”>* </span>’ . __( ‘Name’ ) . ‘</label><input id=”author” name=”author” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author’] ) . ‘” size=”30″‘ . $aria_req . ‘ /></p>’, ’email’ => ‘<p><label for=”email”><span class=”req”>* </span>’ . __( ‘Email’ … Read more
I added remove_action( ‘wp_head’, ‘feed_links’, 2 ); in functions.php file. and added in the header.php. This fulfilled my purpose.
Hook into wp_insert_post, check if it is an auto-draft for a page, and set the comment_status to closed: add_action( ‘wp_insert_post’, ‘t5_disable_default_comments_on_pages’, 10, 2 ); function t5_disable_default_comments_on_pages( $post_ID, $post ) { remove_filter( current_filter(), __FUNCTION__ ); if ( ‘auto-draft’ !== $post->post_status or ‘page’ !== $post->post_type ) return; $post->comment_status=”closed”; wp_update_post( $post ); }
Subscribe To Comments Reloaded allows subscribing without commenting. It uses a link instead of a button, though. Screen shot: It shouldn’t be too hard to customize.