Hide reply button after moveForm is called

Ended up using jQuery to solve this. The form moves around using javascript anyways so it doesn’t break anything for users with js turned off. //when reply button is clicked hide it $(“.comment-reply-link”).click( function() { $(this).hide(); }); //when cancel button is clicked reshow reply button $(“#cancel-comment-reply-link”).click( function() { $(“.comment-reply-link”).show(); });

Change order of comment fields

Some loose implementation of where I would start. The hooks ‘comment_form_default_fields’, ‘comment_form_defaults’, and the ‘comment_form_{location}’ hooks look promising. Line 1569 of comment-template.php is doing the fields, and line 1575 is doing the main field, you might be able to “trick” wordpress into putting the comment field up top…but all that seems like it would take … Read more

Auto-fill Custom comment fields

You can store these values in cookies and fill them when you are creating form inputs. So in save_comment_meta_data add something like this: $commenter_data = array( ‘phone’ => $phone, … ); setcookie(‘commenter_data’, serialize($commenter_data), time()+1209600, COOKIEPATH, COOKIE_DOMAIN, false); And then when you’re creating form: $commenter_data = isset($_COOKIE[‘commenter_data’]) ? unserialize($_COOKIE[‘commenter_data]) : array(); echo ‘<p class=”comment-form-title”>’. ‘<label for=”phone”>’ … Read more

Comment form connection to Gravity Forms

This is possible using the comment_post action, and the GFAPI class which handles entries in WordPress. What you need to first is add using comment_form_default_fields a field which is a checkbox. function add_to_email_list_field($fields) { $fields[‘add-to-email’] = ‘<p class=”comment-form-public”> <input id=”addtoemail” name=”addtoemail” type=”checkbox” /> <label for=”addtoemail”> Check this box to add yourself to our email list. … Read more

How to add extra input fields to CPT’s comment form?

If you have already found the filter inside the comment_form function, you are quite close. There is a filter called comment_form_default_fields which allows you to add extra input fields to the array of fields, which normally holds name, mail address and url. You use it like this (in your theme’s functions.php): add_filter (‘comment_form_default_fields’,’wpse270550_add_field’); function wpse270550_add_field … Read more

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