How to add editor-style.css styling to wp_editor on front end for comments

Actually you can include the editor-style.css (or any other stylesheet), just pass a “content_css” value to tinymce that points to a css file: wp_editor( $content, ‘editablecontent’, array( ‘tinymce’ => array( ‘content_css’ => get_stylesheet_directory_uri() . ‘/editor-styles.css’ ) ); So the original posters code would look like: add_filter( ‘comment_form_defaults’, ‘custom_comment_form_defaults’ ); function custom_comment_form_defaults( $args ) { if … Read more

Hook/Filter before and after comments

do_action( ‘comment_form_before’ ); is called on line 1553 of /wp-includes/comment-template.php, right before the output of the comment form, that should handle that one for you. I’ll update this if I can find the hook before the comments. edit It seems like you might be able to modify Walker_Comment (found in the same file as above) … Read more

Where to remove from comment’s feed?

Things added by WordPress core can not be deleted or removed, or better said, shouldn’t be modified directly. Instead, you can use any of the actions and filters. Specifically, to disable comments feeds, you can use this (note the priority parameter): remove_action( ‘wp_head’, ‘feed_links’, 2 ); The above code will remove also other posts feed … Read more

Allow anonymous comments, but prevent spam [closed]

Okay, I’ve (probably) done just enough reading since asking this question, and apparently this combo of anti-spam plugins, works to a very appreciable extent in mitigating spam: Akismet + Cookies for Comments + Impostercide Knowledgeable people agree: Alex aka Viper007Bond uses Akismet and Cookies for Comments on his own blog, alongside having Trackbacks disabled. (Source) … Read more

Threaded comments – deleting parent comment leads to orphan comments

Had this problem on a site where commenter’s would post comments to the wrong posts and comment threads, had to move thousands of comments from one post to more appropriate posts on the site. I used this plugin http://wordpress.org/extend/plugins/move-wordpress-comments/ for fixing threading. With the plugin you have the option of turning the child comments into … Read more

Get total number of comments from posts in a specific custom taxonomy

You’ll need to loop through your posts, use get_comments_number() to get the number of comments for each post, and then accumulate the total number of comments in a separate variable. e.g.: <?php $features_comment_count = 0; if ( have_posts() ) : while ( have_posts() ) : the_post(); $features_comment_count += get_comments_number(); endwhile; endif; ?> (I’ll assume that … Read more

How can I see all of a post’s comments on a single page as a reader, if pagination is enabled?

Just build a link that has some query args: printf( ‘<a href=”http://example.com/all-comments?pid=%s”>All comments</a>’ ,get_the_ID() ); Then add a page with a a permalink of all-comments, so you have something to target. There you attach a template like the following (just a base to work off): <?php /** * Template Name: All Comments */ // Abort … Read more

get recent comments of a particular category

In this link, there is the following code that addresses your question: // Posts per page setting $ppp = get_option(‘posts_per_page’); // either use the WordPress global Posts per page setting or set a custom one like $ppp = 10; $custom_offset = 0; // If you are dealing with your custom pagination, then you can calculate … Read more