We conclude this WordPress theme tutorial for beginners by taking a quick recap of what we have learned. And look into what you can do next and how to improve yourself as a WordPress Theme developer.
What we have created
Let’s take a quick recap of what we have learned and actually created in this tutorial:
- The basics of what WordPress accepts as a theme.
- How WordPress chooses templates from a theme, depending on which page we are at. We also looked into the most common templates a theme should contain as a minimum.
- Building blocks and how to cleverly split content into different files to reuse them.
- WordPress hooks; what they are and which hooks we absolutely need to add in a theme.
- The most common WordPress functions for outputting post information.
- Where to place all our backend theme code that goes outside the templates.
- How to set up a theme with functionality supports
- The proper way to add stylesheets and javascript files.
- Adding translation support for our theme, allowing it to be translated into different languages.
- Custom page templates
- How to perform custom post queries.
Not bad for a beginner!
The end result
Now, I will admit that the end result looks horrible. But that’s just because we did not add any styling! Keep in mind that all the foundation (HTML and classes) for styling are there and ready.
It’s what’s on the inside that counts, right? Right?
This tutorial’s goal was to guide you through the basic functionality needed for a minimal functional theme. Now it’s up to you to further develop, tweak and style your theme into something awesome!
What’s next?
Where to go from here?
It’s really up to you and what you are most interested in. If you want to make a simple, but beautiful-looking blog theme, go dive into styling. You already have a solid base. If you are more interested in backend code and how to make a solid code structure, go deeper into PHP and how you can implement OOP (object-oriented programming) in your theme.
Here are some suggestions to where to go next:
Complete the theme created in this tutorial
- Build on and develop the theme you created during this tutorial, by adding more templates and functionality. The theme as it is now contains the absolute minimum. Look into for example how to add a mobile menu, or show custom post meta data. Then use that theme as a foundation to make more and different themes.
- Make the theme look beautiful. You can include libraries such as Bootstrap to get a solid styling foundation. Supply with icons from FontAwesome and Google Fonts for adding beautiful fonts to your web design. Also consider using SCSS or LESS to make it easier and faster to write your styling. Get familiar with WordPress’ classes that appears in body and posts, and add good and consistent HTML wrappers in your templates.
Extend the theme with more functionality
- Start learning about how to implement theme settings using WordPress Customizer. This allows you to add admin settings such as logo image, colors and more. Add custom settings for your theme to allow users of your theme to customize the look.
- Learn about the new Gutenberg editor in WordPress and how to use it to make more advanced content. Either by simply styling or modifying existing blocks, or by creating your own custom blocks. You might want to look into how to easily set up a proper front page for your theme too.
- Learn to create custom post types for custom content. Your theme could feature content such as a portfolio, list of books or movies, or showing off products that you might sell.
Further steps to become a WordPress developer
- Make sure your theme has a solid PHP foundation. Having everything in
functions.php
can very quickly make this file very long and unreadable. Learn how to divide your backend code in different files, and define your own PHP classes to do the heavy lifting. You can go even further and use PHP namespaces and autoloader.
If there are certain parts you are unsure about, do research. There are plenty of resources available, and WordPress’ documentation site will help you along the way. I also have quite a few posts that goes in-depth in topics such as hooks, tricks and possibilities in enqueuing scripts and styles, creating custom post types and taxonomies, learning Gutenberg, and more.
I hope you have had some good use of this tutorial and that you are inspired to learn more!