Even Simpler WordPress Contact Form

Are you tired of all the “bells and whistles” of most WordPress contact forms? Are you exhausted from modifying CSS for hours just to get a contact plugin to display with your theme?

Try out the Simpler Contact Form for WordPress. This solution was based off my original Simple WordPress Contact Form. I’ve been using this for months without any problems.

  • Description: A simple solution for all your contact form needs. All comments left with this form are displayed in your WordPress administration panel.
  • License: GPL
  • Download (370)

How does this work?

Instead of downloading and testing multiple plugins and getting them to work with your theme, you simply replace your “comments.php” file with the one provided in the download. It allows people to comment on a page called “Contact,” but instead of displaying the comments, they are hidden. Only an administrator can view the comments from your WordPress dashboard.

The “comments.php” file included is a basic comments file. It just has a few lines of code changed that check to see if the page’s name is “Contact.”

Using the file on different or multiple pages

To use the contact form on a page with a different name, open “comments.php” and edit this line:

if (is_page('Contact')) {

You would change Contact to the name, slug, or ID of your page.

To use the contact form on multiple pages, change the above code to something like this example:

if (is_page('Contact') || is_page('About')) {

All this does is tells the comments file to not display comments on the pages that you name.

Foreseeable problems

I’ve been perfectly happy using this solution for months now. However, some bloggers might have 100s of comments every day. This solution might not be ideal for them because the comments are displayed like regular comments in your WordPress administration panel. So, you might have to sift through a lot of comments to see who has contacted you, unless the WordPress team puts together a better comment management system.

Also, if you ever change themes or your “comments.php” file, then your comments on your “Contact” page will no longer be private. There are only two solutions to this. You can delete each comment after you’ve read and replied to it by email or use this solution forever, even with theme changes.

Final thoughts

I’ve never seen this as a permanent solution to my contact form needs, but it’s worked thus far. I’m happy with it because I never get spam since all comments are filtered through Akismet. There’s no need for irritating CAPTCHAs. I don’t have to edit any CSS or XHTML to get the form to display correctly. It appears just like my normal comment form. Plus, all my contact form comments are viewable from my WordPress dashboard.

This definitely isn’t the solution for everyone, but it might be worth trying out. I thought I’d share it with you.

10 Responses to “Even Simpler WordPress Contact Form”

  1. I will try. Actually, I was searching for something like this, that shows the comments in the admin panel. But I never thought that it could be done my modifying the commments.php file! Thanks a lot.

  2. Justin Tadlock

    [...] Tadlock has posted a way to use built-in WordPress comments in lieu of a contact form. Basically, you replace your theme’s current comments.php file with the one that Justin [...]

  3. Thank U!
    Byez

  4. EarnBlogger
    It’s definitely worth checking out, especially if you’re one of those people that reads every comment like me. Even though I get a lot of comments here, I still read them all, so it’s a good solution for me.

    Steve
    No problem. I hope this works out for you well.

  5. Thanks, exactly what I was looking for, although i still need to style the form, better then working with those out of box contact form plugins with a million invalid CSS elements

  6. Hi Justin,

    I’ve installed it and like the simple functionality, but is there a way to make it do something other than show the same page after the comment has been submitted?

    I’m guessing not, so will probably do something like put a link back to the home page on the contact page, but it’s a bit inelegant.

    Thanks for the idea though (and for the theme!)

  7. Justin Tadlock

    [...] Even Simpler WordPress Contact Form- A simple solution for all your contact form needs. All comments left with this form are displayed [...]

  8. Hello!
    I think this try.

  9. Justin Tadlock

    [...] easily on WordPress- Two easy ways to use if you just want a static front page on your blog. 6) Even Simpler WordPress Contact Form- A simple solution for all your contact form needs. All comments left with this form are displayed [...]

  10. Justin Tadlock

    [...] Even Simpler WordPress Contact Form- A simple solution for all your contact form needs. All comments left with this form are displayed [...]

Leave a reply

Log in or Register



XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> 
<blockquote cite=""> <cite> <code> <del datetime=""> <em> 
<q cite=""> <strong>