Every wordpress site is need to contact us page for there website or blog. All the people use the wordpress plugin for creating the contact us page. When you install the wordpress plugin that will install some extra code to your wordpress site. After using wordpress plugin you need some customization in that plugin due to UI. You need R&D time and development time.
In this article I will show how you can create the contact us page with out any wordpress plugin. Using following code you can create the contact us form very easily.
First create contact-us.php page in your wordpress theme folder and put following code in that file.
<?php
/*
Template Name: Contact Us
*/
if($_POST[sent]){
$error = "";
if(!trim($_POST[your_name])){
$error .= "<p>Please enter your name</p>";
}
if(!filter_var(trim($_POST[your_email]),FILTER_VALIDATE_EMAIL)){
$error .= "<p>Please enter a valid email address</p>";
}
if(!trim($_POST[your_message])){
$error .= "<p>Please enter a message</p>";
}
if(!trim($_POST[your_subject])){
$error .= "<p>Please enter a message</p>";
}
if(!$error){
$email = wp_mail(get_option("admin_email"),trim($_POST[your_name])." sent you a message from ".get_option("blogname"),stripslashes(trim($_POST[your_message])),"From: ".trim($_POST[your_name])." <".trim($_POST[your_email]).">\r\nReply-To:".trim($_POST[your_email]));
}
}
?>
<?php get_header(); ?>
<div id="container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1><?php the_title(); ?></h1>
<div>
<?php if($email){ ?>
<p><strong>Message succesfully sent. I'll reply as soon as I can</strong></p>
<?php } else { if($error) { ?>
<p><strong>Your messange hasn't been sent</strong><p>
<?php echo $error; ?>
<?php } else { the_content(); } ?>
<form action="<?php the_permalink(); ?>" id="contact_me" method="post">
<input type="hidden" name="sent" id="sent" value="1" />
<div id="form">
<div id="lebel">Your Name (required)</div>
<div id="input-field"><input type="text" name="your_name" id="your_name" value="<?php echo $_POST[your_name];?>" /></div>
<div id="lebel">Your Email (required)</div>
<div id="input-field"><input type="text" name="your_email" id="your_email" value="<?php echo $_POST[your_email];?>" /></div>
<div id="lebel">Subject</div>
<div id="input-field"><input type="text" name="your_subject" id="your_subject" value="<?php echo $_POST[your_subject];?>" /></div>
<div id="lebel">Your Message(required)</div>
<div id="input-field"><textarea name="your_message" id="your_message"><?php echo stripslashes($_POST[your_message]); ?></textarea></div>
<div id="lebel"> </div>
<div id="input-field"><input type="submit" name = "send" value = "Send email" /></div>
</div>
</form>
<?php } ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<?php endwhile; ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Then go to your wordpress admin panel. Create page called contact us. In Right side panel you will find the “page attribute” section. From template drop down choose the Contact Us option. and create the contact us page.

WordPress uses the wp_mail() function for sending the email. all wordpress plugin also use the wp_mail() function for sending the email.
If you are having issues with sending the email with this function then you should use the different SMTP mail server for sending mail.
For sending email through SMTP in detail you should check the following article.
http://images.wordpressapi.com/2010/11/24/send-smtp-email-wordpress-plugin/
With this code you can write your own CSS for styling the contact form as per your wordpress theme. If you are having any issues or question about this script then please write to me.
Incoming search terms:
- wordpress contact us page
- how to make contact us page in wordpress
- how to create contact us page in wordpress
- create contact form wordpress without plugin
- how to create plugin in wordpress for showing form
- create a contact from php for wordpress
- how to add a contact page in free wordpress
- wordpress contact without plugin
- contact plugin for wordpress to add in index page
- how to create a contact plugin in wordpress
- how we can use plugin for contacr us in wordpress
- how to use contact us plugin in wordpress
- how to send email in contact form in wordpress without plugin
- how to add a contact us form to wordpress in admin side
- wordpress plugin post form to api
- make a wordpress form no plugins
- usare wp_mail
- wordpress contact form without plugin
- wordpress contact us form without plugin
- make a contact us plugin for wordpress






Meanwhile I’m the exact opposite to most people at commenting and will comment if I have the tiniest little thing to say, probably cos I started commenting with TwentyMajor’s blog that almost instantly goes off topic.
Howdy. Great work once again. I enjoyed reading your blog for the reason that the writers often post great pieces of information. Awesome article.I plan to add this blog to my faves. I am planning to subscribe to the blog feed too. Just got a brand new cell too. Does anyone own the galaxy??? It is awesome..
Good post….thanks for sharing.. very useful for me
Hi. Pretty intriguing web-site. I discovered it on Yahoo. I’ll definately propose it to my friends. Please preserve up the wonderful operate.
Why do notyou guys just come out and say we appreciate uncomplicated logos!???
Could I make a suggestion? I do think youve got something great here. But what if you also offered a few references towards a site which supports what you are saying? Or perhaps you may give us some extra information to look at, whatever would connect what you were saying, something more concrete?
I revelled reading it. I require to read more on this subject…I am admiring the time and effort you put in your blog, because it is apparently one great place where I can find lot of reusable info..
Hello, you used to write fantastic, but the last several posts have been kinda boring? I miss your great writings. Past several posts are just a little out of track! come on!
i in likelihood it how to be the occasion make touch us page without wordpress plugin | WordPress API conj im your rss reader
nice post.. i was searching for it. i have using plugins they rally overload our site. thanxx
Cara obrigado pela dica, estou usando em meu site!
How do I send this information to a databse instead – basically I would like to send to database, receive a notification and also send email to the person that contact me. Could this be achieved at one go? Thanks!
Intriguing post. I have been searching for some good resources for solar panels and discovered your blog. Planning to bookmark this one!
Great stuff. Thanks for this!
Good! Thank you! I always wanted to write in my site something like that. Can I take part of your post to my blog?
Awesome post. I so good to see someone taking the time to share this information
I’ve been checking your blog for a while now, seems like everyday I learn something new
Thanks
Thanks for posting. Good to see that not everyone is using RSS feeds to build their blogs
Of course, what a great site and informative posts, I will add backlink – bookmark this site? Regards, Reader
I’ve just started off a blog, the knowledge you give on this site has aided me extremely. Thank you for all your time & work.
This post makes a lot of sense !
I REALLY liked your post and blog! It took me a minute bit to find your site…but I bookmarked it. Would you mind if I posted a link back to your post?
Awesome post. I so good to see someone taking the time to share this information
I was just having a conversation over this I am glad I came across this it cleared some of the questions I had.
Great read. Thanks for the info!
Hello, this is my first time i visit here. I found so many interesting in your blog especially on how to determine the topic. keep up the good work.
I would like to say “wow” what a inspiring post. This is really great. Keep doing what you’re doing!!
I’ve been checking your blog for a while now, seems like everyday I learn something new
Thanks
Hello, this is my first time i visit here. I found so many interesting in your blog especially on how to determine the topic. keep up the good work.
This post makes a lot of sense !
http://universitiesmap.com
The contact form doesnt send the email to the desired email address of the blog