Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

How to create custom (HTML) contact forms and set them up for PHP submission in a Wordpress custom theme

Hi there,

I would like to know how to make pretty, self-designed contact forms to place in a Wordpress site (without using an off-the-shelf plugin).

So...Randy has taught us how to process contact form data using a hand-coded PHP form in the Shirts-4-Mike site. For the HTML form 'action' attribute we just put 'contact.php' to enable the form information to be submitted and a thankyou message to appear on the same page. But in Wordpress, if we have a contact page with the URL of '?page_id=26' - and this string is entered into the 'action' attribute - the form is not submitted correctly for some reason.

I would be grateful if someone could shed light on how to design custom contact forms for Wordpress sites, without relying on plugins such as Contact Form 7, or paid for plugins.

Thanks,

Robert London, UK

2 Answers

James Bray
James Bray
8,466 Points

Would also like to know how to extend this tutorial to be compatible with Wordpress.

J