Comment Link from get_comments()?

You’re really close! Add #comment-<?php comment_id(); ?>to the href to append the anchor link <a href=”<?php echo get_permalink($comment->comment_post_ID);?>#comment-<?php comment_ID() ?>”> <?php echo $post->post_title; ?> </a>

Is there a specific term for Plugins that are specified in a WordPress Post using Comments?

There’s a similar concept for plugins called shortcodes (as andrewk said). The syntax for these is slightly different than the more tag (which does look a lot like an html comment). Shortcodes are wrapped in square braces like so: [myshortcode arg1=”something” arg2=”something else”] Shortocde is the term for the technique, but plugins that implement shortcodes … Read more

How come pending comments are appearing in admin?

Your dashboard got alerted by trackbacks and pingbacks. Check the links for more info. As @eileen.carpenter mentioned on the comments, you should uncheck Allow link notifications from other blogs (pingbacks and trackbacks.) in your dashboard for them to be disabled. If you approve them, they’ll appear as comments in your posts/pages. Depending on the theme, … Read more

Why could my comment_form variable not be working?

This code makes no sense: function my_fields($fields) { $fields[‘new’] = ‘<p>red rover 1</p>’; return $fields; } add_filter(‘comment_form_top’,’my_fields’); I’m not even sure what it’s supposed to do, because comment_form_top is an action, not a filter. If you want to add extra fields, you should be using the comment_form_default_fields filter: add_filter(‘comment_form_default_fields’,’my_fields’); However, this might not work or … Read more

How can I get list of emails of users who commented on a post?

global $wpdb, $post; $query = sprintf(“SELECT comment_author_email FROM {$wpdb->comments} JOIN {$wpdb->posts} ON {$wpdb->posts}.ID = {$wpdb->comments}.comment_post_ID WHERE comment_post_ID = %d AND comment_approved = ‘1’”, $post->ID); $emails = $wpdb->get_col($query); $emails = array_unique($emails); // your e-mails print_r($emails); You can also use the built-in WP_Comment_Query (or get_comments), but it’s going to be a little slower…

show list of latest comments for each post in a loop

You should place your code inside the loop and add to the args array ‘post_id’ => get_the_ID() so it should look like this: while(have_posts()){ the_post(); //your post loop output $args = array( ‘status’ => ‘approved’, ‘number’ => ‘5’, ‘post_id’ => get_the_ID() ); $comments = get_comments($args); foreach($comments as $comment) : echo( $comment->get_avatar . $comment->comment_author . ‘<br … Read more

Commenting system for WordPress

When you use Disqus you are in a way giving away the control to that company. The module is indeed very nicely built, you can access Disqus admin section from within your WP admin panel, but like I said; you are handing over the “root control” to Disqus.