Can I turn off further comments on a single page?

You can change the setting in the Discussion post meta box: (If you can’t see this meta box on your post edit screen, go to the Screen Options tab and check the box next to ‘Discussion’) Changing this setting will not delete existing comments. It will just turn off the ability to comment as long … Read more

Problems to disable the comments for my statics pages

First of all, thanks to Ian Stewart for the codes here- In functions.php paste the following codes: // Template for comments and pingbacks. if ( ! function_exists( ‘my_comment’ ) ) : function my_comment( $comment, $args, $depth ) { $GLOBALS[‘comment’] = $comment; switch ( $comment->comment_type ) : case ‘pingback’ : case ‘trackback’ : // Display trackbacks … Read more

Embedding Youtube video on comments

Just add the comments to oEmbed. Here’s a small plugin that you can use as MU-Plugin or normal plugin and that should explain what’s going on pretty well. <?php defined( ‘ABSPATH’ ) or exit; /* Plugin Name: (#105942) oEmbed Comments */ add_filter( ‘comment_text’, ‘wpse_105942_oembed_comments’, 0 ); function wpse_105942_oembed_comments( $comment ) { add_filter( ’embed_oembed_discover’, ‘__return_false’, 999 … Read more

displaying recent comments outside loop without plugin

You can do that with get_comments. <?php $comments = get_comments(array( ‘number’ => 10, // 10 comments ‘status’ => ‘approve’, // only approved comments ‘post_status’ => ‘publish’, // only on published posts )); // do stuff with $comments You can see how the core itself does this in the recent comments widget.

Remove comment section from new page

If you want to be rid of comments on your site, one option is to remove the code from your theme files. You would need to search single.php, home.php, page.php, etc. within wp-content/themes/*your-active-theme* and find: <? php comments_template(); ?> Remove that and the comments section should disappear. NOTE: this change will be undone if you … Read more

How to get comments other than using wp_list_comments?

This is going to be a labor intensive workaround but get_comments is probably what you want. From the Codex: $comments = get_comments(‘post_id=15’); foreach($comments as $comment) : echo($comment->comment_author); endforeach; There is also WP_Comment_Query if you prefer.

Insert Ads “into” comments section in Genesis Themework

I would use the Genesis Simple Hooks plugin which allows you to add code to Genesis Comment Form hook. I’m using Hostgator ads for this example, but adsense can be used too. I dropped this code <a href=”http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=brilliantpamela-” style=”float:right; margin: 4px 3px;”><img src=”http://tracking.hostgator.com/img/Discount_Shared/Hostgator-new-_AN-125×125.gif” border=”0″></a> into The simple hook action only allows you to place code … Read more