Add Comment Custom Field

Here you go: Adding Custom Fields to WordPress Comment Forms? And another awesome post on this: http://wpengineer.com/2214/adding-input-fields-to-the-comment-form/ Functions are available to add/update, delete comment meta, similar to post and user meta. Edit: Here’s an example to give you a start (put the code into the functions.php or in a custom plugin): Add the fields to … Read more

Custom comments

$args = array(‘post_id’=>get_the_ID(), ‘status’=> ‘approve’); $all_comm = get_comments($args); $per_page = get_option(“comments_per_page”); if(!$per_page) $per_page = 4; $cpage = get_query_var(“cpage”); if(!$cpage) $cpage = 1; if(round(count($all_comm)/$per_page) == 0) $total = 1; else $total = round(count($all_comm)/$per_page); $args_comments = array( ‘base’ => add_query_arg( ‘cpage’, ‘%#%’ ), ‘format’ => “”, ‘total’ => $total, ‘current’ => $cpage, ‘echo’ => false, ‘add_fragment’ => … Read more

Delayed commenting

There isn’t a plugin that I know of. How many comments are we talking about? I’m assuming to many to manually approve. A simple solution I can think of would be adding something like this to the comment loop in comments.php. Find the foreach loop and replace it with something like <?php //set the date … Read more

Query & Sort Comments by custom comment meta

Unfortunately it’s unsupported by the applicable WordPress functions for querying comments, which is primarily due to(i feel) not enough people(or anyone) yet asking for it. I want to highlight a couple of core files here to help understand the issue. First up comments-template.php, the comment_template function, it’s this function that queries for comments and then … Read more

How to override function twentyten_comment

I was working on another part of my website and found the issue. For some reason, child functions.php was not being recognized by wordpress. Mine was listed in the right admin toolbar as ‘functions.php’ not as Theme-functions ‘(functions.php)’ I copied the content, created a new ‘functions.php’ and pasted the contents into the new file; then … Read more