How do I separate author avatars and comments in 3.4.2?

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

Actual comments not showing, but form is?

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

2 tick boxes appearing below comments

Those are “subscribe” checkboxes. View source and you can see them and the rest of the content. <p class=”comment-subscription-form”> <input type=”checkbox” name=”subscribe_comments” id=”subscribe_comments” value=”subscribe” style=”width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;” /> <label class=”subscribe-label” id=”subscribe-label” for=”subscribe_comments”>Notify me of follow-up comments by email.</label></p> <p class=”comment-subscription-form”> <input type=”checkbox” name=”subscribe_blog” id=”subscribe_blog” value=”subscribe” style=”width: auto; -moz-appearance: checkbox; -webkit-appearance: checkbox;” /> … Read more

By Default, Turn Comments Off for Pages & Leave Comments On for Posts

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 ); }

In list with recent coments – only show one comment per page/post (latest comment)

First you should KNOW all different posts with comments: global $wpdb; $SelectSQL = “SELECT DISTINCT `comment_post_ID` FROM {$wpdb->comments} LIMIT 0, 15”; $Rows = $wpdb->get_results($SelectSQL); then for each of these posts get the latest comment: foreach($Rows as $row): $comment = get_comments(array(‘post_id’=>$row->comment_post_ID, ‘number’=>1, ‘status’=>’appprove’)); $comment = $comment[0]; … and continue with the display of comment, hope you … Read more

Show count of all comments by meta_value from a users posts

Take a look at the arguments you’re passing to get_comments() and compare them to the documentation on the WordPress Codex. Your example – $args = array( ‘include’ => $postids, ‘meta_query’ => array( array( ‘key’ => ‘viewed_status’, ‘value’ => ‘unseen’ ) ), ‘count’ => true ); The codex example – $defaults = array( ‘author_email’ => ”, … Read more

approve,spam,trash etc. options are not coming on comments in admin panel

I found a way to hijack the comment before it’s attached to its post in the DB. Using the snippet below you can attach every comment to your dummy post. Just change COMMENT_ID to the ID of your dummy post. No hacking of core needed! <?php add_filter(‘preprocess_comment’, ‘akt_hijack_comment’); function akt_hijack_comment($comment) { define(‘AKT_REDIRECT_URL’, $comment[‘comment_post_ID’]); $comment[‘comment_post_ID’] = … Read more

How do I get the comments section to show up?

if you look in the twentyTwelve theme. you can see how they get the comments. Look in the full-width.php file and you can see this code <?php comments_template( ”, true ); ?> this will call the code to get your comments section. Now you must make sure that your theme has the comments.php. You can … Read more

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