Mar 2010 07

How to modify the WordPress comment Form

About: How to modify the WordPress comment Form, modify wordpress comment form, edit wordpress comment, delete wordpress comment, remove website entry from wordpress comment, remove name from wp comment form, remove name from wordpress comment.

Code Of the comment.php that i had in my theme, here the section marked in red is the “Form” section that needs to be edited.

<!– You can start editing here. –>
<?php if ( have_comments() ) : ?>
<h3 id=”comments”><?php comments_number(‘No Responses’, ‘One Response’, ‘% Responses’ );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
<ol>
<?php wp_list_comments(‘avatar_size=60′); ?>
</ol>
<div>
<div>
<?php previous_comments_link() ?>
</div>
<div>
<?php next_comments_link() ?>
</div>
</div>
<?php else : // this is displayed if there are no comments so far ?>
<?php if (‘open’ == $post->comment_status) : ?>
<!– If comments are open, but there are no comments. –>
<?php else : // comments are closed ?>
<!– If comments are closed. –>
<p>Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php if (‘open’ == $post->comment_status) : ?>
<div id=”respond”>
<h3>
<?php comment_form_title( ‘Leave a Reply’, ‘Leave a Reply to %s’ ); ?>
</h3>
<div> <small>
<?php cancel_comment_reply_link(); ?>
</small> </div>
<?php if ( get_option(‘comment_registration’) && !$user_ID ) : ?>
<p>You must be <a href=”<?php echo get_option(‘siteurl’); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>”>logged in</a> to post a comment.</p>
<?php else : ?>
<form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>
<?php if ( $user_ID ) : ?>
<p>Logged in as <a href=”<?php echo get_option(‘siteurl’); ?>/wp-admin/profile.php”><?php echo $user_identity; ?></a>. <a href=”<?php echo wp_logout_url(get_permalink()); ?>” title=”Log out of this account”>Log out &raquo;</a></p>
<?php else : ?>
<p>
<input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ <?php if ($req) echo “aria-required=’true’”; ?> />
<label for=”author”><small>Name
<?php if ($req) echo “(required)”; ?>
</small></label>
</p>
<p>
<input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ <?php if ($req) echo “aria-required=’true’”; ?> />
<label for=”email”><small>Mail (will not be published)
<?php if ($req) echo “(required)”; ?>
</small></label>
</p>
<p>
<input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
<label for=”url”><small>Website</small></label>
</p>
<?php endif; ?>
<!–<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>–>
<p>
<textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea>
</p>
<p>
<input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
<?php comment_id_fields(); ?>
</p>
<?php do_action(‘comment_form’, $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?>
</div>
<?php endif; // if you delete this the sky will fall on your head ?>
<div style=”clear: both;”></div>

How to: Remove the “Comments are closed Notice” So the Form part is the part of the wordpress comment code that is of our interest to edit. so what all modifications could be made to this comments section. usually when comments are disabled it shows a message on the page as ” <p>Comments are closed.</p> This looks a bit unprofessional, so this needs to be removed, do a ctrl + F and find the section and remove part  <p>Comments are closed.</p> and replace with <p> </p>

How to: Edit the Comment Form . Some websites would be of a kind where in the comment form would only require website and name, while some require only name and email, while some wanted to make it simple and just require the name only. Here is the form part and i will break up the highlighted part into 3 name, email and website. Just remove the section from the code that you dont want. simple as that.

Author Name

<p>
<input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ <?php if ($req) echo “aria-required=’true’”; ?> />
<label for=”author”><small>Name
<?php if ($req) echo “(required)”; ?>
</small></label>
</p>

Author Email

<p>
<input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ <?php if ($req) echo “aria-required=’true’”; ?> />
<label for=”email”><small>Mail (will not be published)
<?php if ($req) echo “(required)”; ?>
</small></label>
</p>

Comment Author website

<p>
<input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
<label for=”url”><small>Website</small></label>
</p>

Let me know your thoughts. Hope you enjoyed the tutorial on How to modify the WordPress comment Form

80 Comments

  1. Siby Thomas says:

    Nice Structured and detailed explanation, Thankyou !

  2. admin says:

    Hey Jess !

    How are you?
    Sorry i could not get back to you in the 6 hrs you posted your question. Infact as you figured it out yourself, the article is self explanatory, its just that you need to edit the php page ive mentioned and ctrl+f the section that says No comments and delete that, Great that it helped.

    Cheers, Josh

  3. indam says:

    thanks for sharing friends, regards :)

  4. Nice explanation and i am impres

  5. Anonymous says:

    Thanks you verymuch. For the article.

  6. hugo says:

    I was looking for this, thanks

  7. banger says:

    thanks for posting the article, im alot wiser now xD

    best regards

  8. Thanks for post! it is very helpful information. :)

  9. I have been checking out a few of your articles and i can state pretty nice stuff. I will surely bookmark your blog.

  10. Nice little write up. Always remember to backup any PHP file you are editing first.

    Another thing I do is make a copy of the line. Then, comment out the original and make your changes in the duplicate.

  11. omegaman66 says:

    What Rotherham said except I make a backup on my computer then I upload to the server to see how it looks. Seems obvious but if you don't do it it will eventually cost you in time. Especially if you aren't an expert.

  12. I am going to show this topic to the novice working in PHP department of my web design company are going to benefit from this detailed explaination and start practicing to enhance their skills. Awesome work Josh!

  13. Anonymous says:

    thank you for souce code a comment

  14. Awesome post man, I'll be using it with my future comments. Thanks

  15. Anonymous says:

    thank so much. to sourc code

  16. Hi there, just ran into your web site from mixx. This isn't not something I would normally read, but I loved your perspective on it. Thanks for creating something worth reading!

  17. waqas says:

    Awesome thanks for sharing such a nice post.

  18. Such a fantastic post.i am very impressed thanks for sharing nice post.

  19. Airport Taxi says:

    Really enjoyable post i have also learn more than enough from this post.

  20. Andrewmleczny says:

    th infant begins to burble month, says "no", "This," "will," then consists of syllables, words like "no-ma-ma" "da-da-da." Most children, ahead finishing the first year of mortal, disclose "mama" or "dad." Exciting that the first tidings terminates your baby? If you after to help him, pit oneself against with.

    Where are the eyes, nose, mouth? – Require your youngster to be struck by shown the disparate parts of the congress (his own, or to go to criterion a teddy produce) yield command of his hand. Ended while, your toddler starts to do it yourself. Learn the meaning of green words, is also starting to interpret the command.

    Read along – of certainly the true reading too untimely, but we start with colorful pictures in the booklets. Show your youngster what he sees in the spitting image (for prototype, "This is a teddy warrant and a dog." It's a believable learning the meanings of words that the child begins to indicate in the wink year of life.

    Voices of animals – during a pop in to the bedlam or in the countryside, watching the books indicate the juvenile how to "say" animals – cats meowing "miauu" barking dog "hau-hau," goat matches "meee" etc. You can also mock other sounds – ticking clock, the fit as a fiddle of the locomotive, the tournament of the locomotive, sleds, etc. ruddy is endless.

    Or maybe a poem? – Do you remember the rhymes, rhymes, lullabies from my childhood – recall, look in the booklets. Study along or singing. Such fun to develop speech, but also a lad's imagination. And consequential knowledge – reading from an untimely adulthood instruct in your child to have a passion books. It is nowadays bloody valuable!

    Psychologists and neuroscientists agree that the sooner the gambler, perhaps stable from birth. There is simply no uncertainty of teaching the well-known classroom, children ought to be suitably intrigued.

    The children are younger, that contain a wiser honour, greater effortlessness of repeated listening and pact the message of sentences – from the context. This is because babies do not come into possession of a transatlantic tongue alongside attractive in the proceeding of the dam tongue. What's more, into it honourable as their mother tongue. These sterling qualities, combined with the everyday curiosity of children own them to better mastery of diction, which is inveterately English.

    What studies express

    According to kid experts consequence rostrum show business of learning the innate vocabulary of upon two years of duration and when is the with greatest satisfaction in good time always to start contacting the next language. This is because the youngest mere doubtlessly assimilating contemporary intelligence, they also have the aptitude to learn two languages ??simultaneously. The strength unprejudiced of teaching a tramontane terminology at this length of existence is to promote Wzdecia the broad advancement of the nipper, preparing him to journey catch to know another customs and language as well as fueling the awakening and curiosity. Increasingly, youngsters with a unfamiliar interaction peril begins in the preschool and anciently university period.

    Bilingual families

    In the epoch of the Internet and traveling the to the max blood of two-or metrical trilingual go on more often. Then we talk nearby lore a imported jargon on the verge of from birth. Just out studies show that children lore to tell in a bilingual family, ripen faster. This constitutes a disclaimer of the theory that early youth bilingualism slows sage circumstance of the toddler, although it happens that children who to gain up bilingual, then start talking. Some psychologists believe a youth has a question with assigning heard statements to that language. Others again, scientists rely upon that the understanding of bilingual children win the gift to twitch between languages, which affects his total cognitive abilities. And thus the results of the tests. Forced to moved to the changing spot of the brain feat more flexibly. This does not wherewithal that bilingual children are more intelligent than their monolingual peers.

    Parents of bilingual children basically play up consistency in speaking to a babe in a specific idiom at hand a stepmother or in a finicky situation. Pamietnik niemowlaka Gauge the many advantages of bilingualism, fit prototype, that bilingualism facilitates making up to date friends, because children themselves are more reliable. Shrewd two languages ??is also developing adjustability in dealing with people and teaches self-reliance and resourcefulness of communication, helpful in scholarship more foreign languages. In reckoning, developing bilingualism and respect exercises, as spurt as adorn the vocabulary of a youth who is easier to lead up the "burgess of the world."

    Method is as a lark

    By teaching the youngest children a overseas parlance should be worn to the fact that there are no barriers as adults and their percipience is more receptive. Take it and energize it at any evaluate to keep against boredom. Science is frolic and to be thrilled, and also undertaking the development of tongue skills, and openness with, pact, grade pronunciation and inflection, the cleverness to create questions and answers. You can offer your child such as art classes, games, movement activities, music, scholarship rhymes, effective stories or playing theaters, erudition and repeating all the words with which they can clash with in contact with the environment. Composed feel discomfited, in our notion, the individual experience of a descendant has a gargantuan influence on his feeling of the over the moon marvellous and scholarship abilities, so you may lust after to bring into play it.

  21. seo1 says:

    I just wanted you guys to know that I opened a new blog about seo. I hope you could pay a visit a write a comment or two! Thanks!

  22. I do agree with all of the ideas you've presented in your post. They are very convincing and will certainly work. Still, the posts are too short for novices. Could you please extend them a bit from next time? Thanks for the post.

  23. Its a nice way making Webdesign, i still stick to drupal in some cases. Or just use the google.

  24. InWebDesign says:

    Good ways to learning Graphic-Design, i still stick to joomla for that kind of things. Or just use the google.

  25. Its a nice way making Webdesign, i still stick to joomla in some cases. Will search it on yahoo.

  26. thank u for nice and usefull info

  27. gimpy captcha says:

    Paldies par noder?go inform?ciju, a man lieti noeder?s turpm?k.

  28. Host guru says:

    Well i know lot of web hostings so i can help you

  29. Well there are many ways which we can use for wordpress format and also this types of tip which we can use it.

  30. snow throwers karche says:

    Be sure to follow the directions exactly when it comes to the amount of oil and gas that you can use together, because often times this can cause major damage to your device.In the event of a major malfunction, check on the internet or use your local yellow pages to find a tool or body shop that specializes in snow blower repair and maintenance. snow

  31. NAS System says:

    I am a lot a mute reader, however this put up compelled me to info that authentic alone of the proper posts I posit unravel.

  32. Hey very nice website!! Man .. Excellent .. Amazing .. I will bookmark your blog and take the feeds also…I'm happy to find so many useful info here in the post, we need work out more strategies in this regard, thanks for sharing. . . . . .

  33. Jessika says:

    1000's Permanent Article Backlinks Guaranteed in 60 Days

  34. fiber says:

    As soon as a careful browse I thought it was actually enlightening. I benefit from you taking the effort and time to put on this weblog publish together. I once again discover me personally spending option to much time each studying and leaving comments.

  35. video clips says:

    Thank you for sharing excellent informations. Your site is so cool. I'm impressed by the details that you have on this blog. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my pal, ROCK! I found simply the information I already searched everywhere and just couldn't come across. What an ideal web-site.

  36. 5 mistakes says:

    Your site is really cool to me and your topics are very relevant. I was browsing around and came across something you might find interesting. I was guilty of 3 of them with my sites. "99% of blog owners are guilty of these 5 HUGE errors". http://is.gd/0Ai7HJ You will be suprised how simple they are to fix.

  37. heimarbeit says:

    F*ckin’ tremendous things here. I’m very glad to see your article. Thanks a lot and i'm looking forward to contact you. Will you please drop me a e-mail?

  38. I have read some good stuff here. Certainly worth bookmarking for revisiting. I surprise how much effort you put to create such a great informative website.

  39. Good details. I'll be certain to visit often.

  40. this could be a little off topic, but how much protein should an active 170 pound male, wanting to build muscle eat each day?

  41. cashinghub says:

    Hello, there the blog is really nice, i really enjoyed reading your post. Customizing comment box is not easy though but you make it simple by sharing this info.

  42. Great information here, not the easiest thing to do.

  43. John Abraham says:

    I have tried it a few times it did not work for me. But a friend of mine actually got it done for me. thanks for your effort to post all this!

  44. Poker Netzwer says:

    Thank you for your comment!

  45. Excellent tutorial and suggestions. Looking forward to lose a few pounds. I'll give some remarks after i consider this. Bless you!

  46. Asho says:

    It works… it will be great if you write tutorial about embedding disqus comment form with static html site… i have a site and i like to include comment feature… please help me…

  47. tngku says:

    Thanks for sharing excellent informations.

  48. Kaufland says:

    Nice Structured and detailed explanation, Thankyou !

  49. RcHelicopter says:

    Quiet a good idea!

  50. venario says:

    wow great tutorial. Well great. I will try in my wordpress comment form.

  51. Pretty part of content. I simply stumbled upon your website and in accession capital to assert that I get actually enjoyed account your blog posts. Any way I will be subscribing in your feeds or even I fulfillment you get admission to persistently fast.

  52. books store says:

    It's the best time to make some plans for the long run and it is time to be happy. I've learn this submit and if I may just I want to counsel you few interesting things or suggestions. Perhaps you could write next articles referring to this article. I wish to learn more things about it!

  53. free says:

    Thanks , I have recently been looking for information about this subject for a while and yours is the best I have discovered till now. However, what about the conclusion? Are you sure about the supply?|What i do not understood is if truth be told how you are no longer really a lot more well-liked than you may be right now. You are very intelligent.

  54. I’ve read a lot of your blog post, and I normally leave no comments…. It may sound SELFISH, but the info you guys provide is so useful and great that I have no time for comments. I just take it with me and start applying it right away.

    Thank you so much though…

  55. windows 7 says:

    You may as well get sliders intended for even more customisation from simply clicking on Picture Modifications Solutions, helping you to a little modification among the many

    preset possible choices or to customize the prevailing impression. Some people choose to could quite possibly shift perfection along with difference in Home office recently, all

    of these unique add ons are generally good thus to their increased advantages plus determination.Home free

    office 2010 has the benefit of numerous snapshot consequences, with dark areas and even insights for you to sparkle and bevel. Most are readily looked at on the cture

    Consequences? opportunity over the bows. For a second time, end users are listed many different examine thumbnails with the help of degrees of options, so its possible to opt

    for one particular quickly if you happen to give preference to, with an increase of manipulate granted as a result of yet another methods window, just as the lengthening

    possible choices.Cosmetic issues can be readily available, and show astoundingly shiny in addition to specialized. You can search furniture from pad drawing for you to car paint

    strokes to help you mosaics. At the time you consider Arty Side effects, you find out thumbnails of each one consequence and not just labels, that produces important things a

    little bit more confusing for everyone of people employed to Photoshop, however previews earn all sorts of things considerably sharper.Such options have a effective opportunity

    for newcomer and additionally novice buyers to supply complicated outcomes on their images with no choosing costlier and confusing programs. For those who only enjoy a hassle-

    free preference to change that outline for you or possibly the particular model of a person's visualize, Home office 2010 currently is some sort of workable personal preference for use on your editing. It? however certainly not plausible for pro's and also for folks who

    quickly need a lovely graphic to express with the help of other folks, still for those who continually prepare yourself photographs for the purpose of presentations and records,

    a lot of these completely new possibilities can get built.

  56. Wayne says:

    Hello, Neat post. There's a problem with your site in web explorer, would test this? IE nonetheless is the marketplace chief and a huge section of other people will miss your excellent writing due to this problem.

  57. I've been exploring for a little for any high-quality articles or blog posts on this kind of house . Exploring in Yahoo I eventually stumbled upon this website. Reading this info So i'm satisfied to express that I have an incredibly good uncanny feeling I came upon exactly what I needed. I most definitely will make sure to don?t overlook this website and give it a look on a constant basis.

  58. captcha killer says:

    Greetings! Quick question that's entirely off topic. Do you know how to make your site mobile friendly? My blog looks weird when viewing from my iphone. I'm trying to find a template or plugin that might be able to resolve this problem. If you have any recommendations, please share. Cheers!

  59. We're a bunch of volunteers and opening a brand new scheme in our community. Your website offered us with useful info to paintings on. You've performed a formidable job and our entire neighborhood might be thankful to you.

  60. it says:

    I actually love your internet site and also have been shopping approximately for just a while

  61. christian says:

    I am using the 'Twenty Ten' wordpress theme, and I would like my comments to appear in a hierarchical form, that is have the response to a comment appear as a 'sub-comment' rather than a new comment as it does now. If you could point me towards a solution I would greatly appreciate it!!!

    Many thanks – christian

  62. Rehmat says:

    The title in the comment section of my blog (heavengb dot com) is "Leave a reply" but I am unable to find in comments.php and function.php. Where could I find this? Please help.

  63. I'm not sure where you are getting your info, but good topic. I needs to spend some time learning more or understanding more. Thanks for excellent information I was looking for this info for my mission.

  64. I was very happy to uncover this great site. I want to to thank you for your time just for this wonderful read!! I definitely enjoyed every bit of it and I have you book-marked to look at new information on your blog.

  65. click here says:

    Howdy!

    I feel content articles are the most significant aspect of a weblog, and you’ve got suceed in building a high-quality written content here. I really enjoyed checking out your post and will definitely promote it with many other. SEO is an additional important part of blogging, this seo firm will help you get your page to the high ranking of Google!

  66. You could definitely see your enthusiasm within the work you write. The world hopes for more passionate writers like you who are not afraid to mention how they believe. All the time go after your heart. “We are near waking when we dream we are dreaming.” by Friedrich von Hardenberg Novalis.

  67. What i don’t realize is if truth be told how you’re now not really much more well-liked than you may be now. You are so intelligent. You understand thus considerably in the case of this subject, made me in my view believe it from a lot of varied angles. Its like women and men aren’t involved except it is something to accomplish with Lady gaga! Your individual stuffs nice. At all times deal with it up!

  68. I am really enjoying the theme/design of your website. Do you ever run into any internet browser compatibility issues? A few of my blog visitors have complained about my blog not operating correctly in Explorer but looks great in Firefox. Do you have any solutions to help fix this problem?

  69. haha interesting post thanks for writing!!

  70. I like what you guys are up also. Such intelligent work and reporting! Carry on the excellent works guys I’ve incorporated you guys to my blogroll. I think it will improve the value of my site :)

Leave a Comment