Anatomy of a WordPress Theme
Great refresher on the “Anatomy of a WordPress theme”. Joost de Valk wrote a detailed breakdown of what each section does and included images as well.
Great refresher on the “Anatomy of a WordPress theme”. Joost de Valk wrote a detailed breakdown of what each section does and included images as well.
I recently coded a landing/splash page for a client of mine that has a form the user fills out and then submits via email to the client. I have coded forms before, but had never learned how the actual submission of data happens via PHP on the server-side. I wanted to share how my simple form works and the code behind it.
Coding the form in HTML is relatively simple. Below is the code used on the client’s live site at nuanced.com/domains.
And here’s basically what the above code looks like without CSS being applied:
Full Name
Domain
Comments (Optional)
So far, it’s all pretty simple and straightforward HTML. However, to get the data being entered on the form from the website to the client, we’ll need PHP. The PHP file gets called in the line below.
The “process.php” file is a separate file that lives in the root directory on the web server that contains our PHP code. Here’s the file below:
As you can see, the form accepts the data being entered after it validates that the inputs are filled out and then parses that data into an email. I added a few comments in the code to explain what some of the lines are doing.
If you’d like to use the above code in your project, just switch out the field names (like fullname, email, etc… ) with your own.
I hope this tutorial helps and if you have a better/more semantic way to do it, let everyone know in the comments.
I found the perfect solution for my theme-ing issues. No more using someone else’s code when I can write it myself and use my own, simpler design. I’m now using the Toolbox theme which is semantic, HTML5 code and then a very minimal amount of CSS leaving plenty of room for styling but still giving you a baseline to get started. Perfection.
Now, on to making more content.
Really, really excited about this news: GitHub for Windows is finally here. I’m anxious to get started learning Git and the GitHub way. I’ll be posting soon on how it’s going.
I rolled out a nice upgrade to the site today by moving to the Yoko theme. Yoko is fully responsive and very minimal which is just what I wanted. Gone is the glossy Web 2.0 nav bar and other stylistic errors and replaced with a nice light texture, the Droid sans font (which I’m not completely sold on yet) and a simple nav bar. Yes, I’m still working on the logo.
I’ve added a few new pages as well with some new content coming soon. I wanted a place to track my Fitness levels and also a place to store my code-specific wallpapers and that content will be coming soon.