How to hide and disable URL and email fields from comments?

After further research I found some relevant functions. Keep in mind it’s probably better to separate these into different functions, and if your WordPress theme gives you any trouble, check this out. // disable url field function disable_comment_url($fields) { if(isset($fields[‘url’])) unset($fields[‘url’]); return $fields; } add_filter(‘comment_form_default_fields’, ‘disable_comment_url’); // disable email field function disable_comment_email($fields) { if(isset($fields[’email’])) unset($fields[’email’]); … Read more

Replace Entire Comment Box with Text

Something like this should be pretty universally functional across themes, as long as they use something like the normal comment form code. if ( ! current_user_can( $capability_required_for_commenting ) ) { add_filter(‘comments_open’, ‘disable_comments’, 20, 2); add_action(‘comment_form_comments_closed’, ‘display_no_comment_permissions_message’ ); } And then somewhere you’ll want to define: function disable_comments() { return false; } function display_no_comment_permissions_message() { ?> … Read more

How to enable truly anonymous posting in bbPress forums? [closed]

When we post an empty anonymous reply, we get the following errors: The part of BBPress that’s responsible for handling this, is the bbp_new_reply_handler() function, in the file /bbpress/includes/replies/functions.php. It contains these lines that are of interest to us: // User is anonymous if ( bbp_is_anonymous() ) { // Filter anonymous data $anonymous_data = bbp_filter_anonymous_post_data(); … Read more

Why default comment fields don’t show up?

Without code and based upon what you are doing, my advise would be to set WP_DEBUG to true in your wp-config.php. If there are any errors causing the fields not to display, they are likely to show up. Especially since you are coding a custom theme, there is a good chance of errors somewhere you … Read more

Get Comment With Meta value

WP_Comment_Query doesn’t pull comment meta. You can search by comment meta but the query doesn’t return that data. You could easily check this yourself by looking at the Codex. You need to loop over the results and run get_comment_meta(), or essentially do the same via a filter on the_comments. It is also possible to add … Read more

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