Publish a message on facebook after having posted a comment

I would like some advice on how to improve the code I use for allowing people to comment posts. Users can only submit a comment if they are connected with Facebook. I started developping this feature directly in the comments.php template. It works but there is another feature which permit people to publish a message … Read more

Changing position of cancel_comment_reply_link and other elements of comment form

How would I move elements of the WordPress comment form, which is called in comments.php with the following: <?php comment_form(); ?> For instance, I’d like to wrap cancel_comment_reply_link in h4 tags and place it below get_post_reply_link. But I don’t see any way to do it. Formerly, all the code for the comment form was there … Read more

How to change the order of elements in comment_form()

I’ve put the class for ‘logged_in_as’ into another container to display the content in another column: <div id=”content-form”> <?php $fields = array( ‘author’ => ‘<div class=”right_col”><p class=”comment-form-author”> <input id=”author” name=”author” type=”text” value=”‘ . esc_attr( $commenter[‘comment_author’] ) . ‘” size=”30″‘ . $aria_req . ‘ /></p>’, ’email’ => ‘<p class=”comment-form-email”> <input id=”email” name=”email” type=”text” value=”Name’ . esc_attr( … Read more

How to add enctype to multipart/form-data to comment form?

I need a way to change the encoding type for my comment form, without hacking the core files. I’m aware of the function to work on the post editing form: post_edit_form_tag. I’ve tried this: jQuery(‘#comment_form’).attr(“enctype”,”multipart/form-data”); But it doesn’t work, the only next step I know of is to hack the source code… Any help would … Read more

Am I using the right hook for removing quicktags on the admin TinyMCE?

This is more of an excercise than something for a client. Anyway, I’m trying to disable the quicktags when you’re on the dashboard and you click on Comments > Edit Comment. On that screen, there’s a TinyMCE with quicktags and the textarea has an id of “content”. I know in the WordPress core, this can … Read more

How to add consent checkbox in comment section

To fulfil the GDPR policy, I want to add a consent checkbox under the “Post Comment” section. I have followed the WpBeginner tutorial and put the following code in my Comment.php file // Now we will add our new privacy checkbox optin ‘cookies’ => ‘<p class=”comment-form-cookies-consent”><input id=”wp-comment-cookies-consent” name=”wp-comment-cookies-consent” type=”checkbox” value=”yes”‘ . $consent . ‘ />’ … Read more