Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to Customize Comment Box in News Pro Theme?
Tagged: Comment Box
- This topic has 4 replies, 2 voices, and was last updated 8 years, 8 months ago by
davidroccato.
-
AuthorPosts
-
March 31, 2015 at 2:34 pm #146302March 31, 2015 at 6:18 pm #146318
ᴅᴀᴠɪᴅ
MemberYes, adding the code to the bottom of your functions.php is the way to do it.
Luckily, as Genesis just uses the default WordPress comments form, there is a sea of WordPress tutorials written already with how to do what you are wanting to do.
For example, for the first question the answer is here. Scroll down to the part titled "Remove Website URL From Comment Form"
I love helping creative entrepreneurs build epic things with WP & Genesis.
April 1, 2015 at 3:55 am #146348davidroccato
ParticipantHi David, thank you for your reply.
I've looked around and I've found few things but they are not all exaclty and I'd like to compact them in just one function. But I don't feel to do any test without being more or less sure before. This is what I've found.
1) This will remove the comment notes and do other things
//***Customize The Comment Form**/ add_filter( 'comment_form_defaults', 'bourncreative_custom_comment_form' ); function bourncreative_custom_comment_form($fields) { $fields['comment_notes_before'] = ''; //Removes Email Privacy Notice $fields['title_reply'] = __( 'Share Your Comments & Feedback:', 'customtheme' ); //Changes The Form Headline $fields['label_submit'] = __( 'Share My Comment', 'customtheme' ); //Changes The Submit Button Text $fields['comment_notes_after'] = ''; //Removes Form Allowed Tags Box return $fields; }
2) This will remove the URL
function crunchify_disable_comment_url($fields) { unset($fields['url']); return $fields; } add_filter('comment_form_default_fields','crunchify_disable_comment_url');
3) This is the one you gave me that do the same above but in another way.
add_filter( 'comment_form_default_fields', 'remove_comment_author_website_url_field' ); function remove_comment_author_website_url_field( $fields ) { if ( isset( $fields['url'] ) ) unset( $fields['url'] ); if ( isset( $fields['fields']['url'] ) ) unset( $fields['fields']['url'] ); return $fields; }
Is the point 2 enough? Can I just add the line unset($fields['url']); to the first function?
Also, in the first function maybe I should replace with: comment_form_default_fields
4) If the above is correct, what I miss is just how to convert in plain text the message.
I've seen that there is the option $fields ['format'] = 'xhtml'; but I don't know if this make sense and if I can change it in just simple text.
Thank you very much,
DavideApril 2, 2015 at 1:26 pm #146488davidroccato
ParticipantAnyone? I'm quite sure the answer is not too far from here but I would prefer to get closer before doing some test. This weekend I'll probably have more time to test everything.
Thanks a lot.
April 3, 2015 at 8:11 am #146548davidroccato
ParticipantUpdate.
I tried and at the end the only codes that worked were the ones David (thanks a lot) gave me from Brad. The others simply break the site, even the ones written from studiopress here: http://my.studiopress.com/snippets/comments/
I could fix the point 1 and 2 but I can't find anything for converting the messages in plain text.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.