Do I have to have a nonce for a custom comment field?

A WordPress Nonce, while not a true nonce, functions similarly in that it exists to secure a form or page from unauthorized access and abuse. By default, the WordPress Comment Form only displays a nonce field if the current user has the unfiltered_html capability. So, if the form is implemented with standard procedures, all you … Read more

Does wp_new_comment expect a comment in HTML?

or should this be ‘Tom & Jerry’? It doesn’t really matter. It’s more important to consider if you don’t know where the comment content is coming from. If you’re inserting user input as the comment content then this should be escaped. wp_new_comment() escapes and sanititizes the comment for you. It’s designed to take the user … Read more

Changing position of cancel_comment_reply_link and other elements of comment form

I think your best bet is to take a look at Otto’s post all about the comment form and functions, here: http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/ If you want to cut to the chase, you can add this function to your functions.php: function my_fields($fields) { $fields[‘new’] = ‘<p>Some new input field here</p>’; return $fields; } add_filter(‘comment_form_default_fields’,’my_fields’); Then set new … Read more

How could I create a ‘private comments’ section on a custom post type?

Comments have an associated author to them. In a section called “Private Comments” – Query for all comments belonging to the current post where wp_comments->comment_author_email equals the email of the current user. Checkout the wp_comments table. It has 15 or so fields you can filter when displaying comments. EDIT: The code would look something like … Read more

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