Custom WordPress Theme
I’ve made WordPress sites in the past, but I’ve never tried building my own custom theme. Till now! Turns out it’s not as hard as I thought it’d be, thanks to this helpful tutorial:
More than 25% of all the websites in the world use WordPress as a CMS. That alone is a good reason to have some WordPress experience under my belt.
Following the tutorial step by step made me better appreciate the building blocks that make up a WordPress site. The tutorial above builds a WordPress theme using Bootstrap, which I’ve also used before, and am a big fan of.
I won’t bother listing the steps on the tutorial since the tutorial already does that, but ultimately building a WordPress theme is all about created six files:
- style.css
- functions.php
- header.php
- footer.php
- sidebar.php
- index.php
I don’t have a ton of experience with PHP, and its syntax can be a little intimidating coming from a friendly syntax like Ruby’s, but once you get over all those <?php question( ‘marks’ ); ?> it’s really not so bad.
I wanted to keep my custom WordPress theme simple, so after following Steps 1 and 2 of the tutorial I backtracked and pared down a lot of the code, eliminating the sidebar and archive and things like that. I also didn’t bother with any widgets. I’d named my theme SuperSimpleTheme, after all.
Once I had something made, I wanted to have a little fun with it, so I used the Giphy API to randomly generate gifs as background images on the Random, Awesome, and Nature pages. Giphy to the rescue as always, spicing up the most boring of websites with motion, color, and randomness.
Following the tutorial and then tweaking the code didn’t take much time at all. Of course, building a legit, full fledged WordPress theme would take a lot more time and effort, but this was good practice in getting started with creating a simple WordPress theme.
You can check out my super simple custom WordPress theme here: https://www.templatemonster.com/wordpress-themes/65620.html
Comments
Post a Comment