Thursday 19 December 2019

Quickstart Guide on How to Develop WordPress Themes

Developing a WordPress theme is surprisingly easy to do. Many people have the impression that theme building is a heavily technical process that requires experience with web development. You’ll be happy to know that isn’t actually the case. 

WordPress is an amazingly flexible platform. Usually, that means things need a lot of tweaking to work properly. While that may be true in advanced cases of speed optimization, it isn’t the case with WordPress themes. 

Just as it’s easy to change themes on a smartphone or a computer, WordPress themes function the same way. So, if you ever felt inclined to make your own theme in Windows, the process is not that far off for WordPress. 

Why Make Your Own Theme

You might be wondering why you’d want to make your own theme when there are so many available. You’d be right to think that, as there are many beautiful and functional WordPress themes on the internet.

One of the most popular reasons, is to have a look and feel that is completely customized to the brand of your site, or how you would like users to engage with content on your site. The good news is that you have two options with this, which are to code a theme from scratch, or to customize a premium theme yourself.

In both scenerios, there are plenty of resources and tools to help you along the way. A great place to start, is at QualityWordpress, as they have loads of choices of themes — but completely customizable and broken down in ‘review’ and ‘list’ style articles.

However, no matter how good they are, they’re not your own. Making something yourself makes it unique. If you have that curiosity, and we’re guessing you do as you are reading this article, then this guide is for you.

Things You Need to Start

Before you can begin creating your own WordPress theme, you need to have two things:

A WordPress website of your own

A Starter Theme. This is something that will help you to create your own theme.

Why You Need a Starter Theme

Think of a starter theme as a blank canvas. You get a fresh, clean slate with all the dimensions and boundaries already set. You only need to begin painting it with the colors you like.

In WordPress terms, you get a blank theme without having to code a theme yourself. It also shows you how all of the parts of a theme work together. Essentially, starting with this does most of the background work for you. 

Make sure that you choose a starter theme as you don’t want this to become a roadblock. Some great ones are Bones or Underscore. 

Underscore in particular is quite popular. Not just because it has all the things you need, but also because it’s made by the famous Automattic company. They have a solid reputation for building safe and efficient web tools. 

Now that we have all the toolswe need, we can begin. 

 

 Install a Local Development Environment

 

Don’t be put off by the technical-sounding name. This is merely a server you’ll install on your computer – it’s essentially an offline version of WordPress. This allows you to make any changes to the site on your computer without affecting your online site right away. 

This gives you the opportunity for trial and error while you decide what you like best, without everyone else seeing what you’re up to. 

The software you need for this is called DesktopServer. Compatible with both Mac and PC, it’s user-friendly and safe, but most importantly, it’s free. 

After the installation is done, you can get your starter theme.

 

Get Your Starter Theme

 

Go to underscores.me and, just like setting up a Facebook account, the site will ask you a couple of questions like what name you want to give your site. 

It’s best not to go to the advanced options at this point as these options might seem daunting, and you don’t need to know what they mean just yet. 

Finally, click the ‘Generate’ button and download the theme in a zip file. 

Use DesktopServer to install the file, and you now have your starter theme ready for you to customize!

 

 Some Terms You Need to Know Beforehand 

 

Template files:

These are the bricks that you’ll use to build your site. These files usually end with a “.php” extension. 

They’re also named according to what goes where. For example, if a template is named “sidebar.php” this will be the sidebar on your site.

Hooks:

These are bits of code added to template files that tell them what to do. 

For example, if you have a code that says to change color when the mouse cursor hovers over the sidebar, then when someone visiting your site hovers their mouse cursor over your sidebar, the hooks will tell the sidebar template to change color.  

 

 Let the Tinkering Begin

 

Now that you understand all the basics, it’s time to begin creating your own theme. 

Just like any other inspirational work, look around a little and see which parts of a site you like. Then, make a small sketch of the site you have in mind with that part you like on a piece of paper. 

This is an important step as you might like three different things but once you put them side by side, you’ll see that they don’t work together. You’ll no doubt find this to be true in the first two or three sketches you do. 

You’ll soon realize why some WordPress themes sell for hundreds of dollars. But don’t let that demotivate you. You are only just starting out on your journey, so don’t compare your creation to those that have already finished theirs.

Once you’re done with your final design, apply the changes to the software and save it. Now it’s time to test it and upload it to the internet. 

 

Testing and Uploading Your Theme 

 

In order to test if your site, go to Theme Unit Test. This will send your site a set of data that will test if it’s working properly.  

After you’ve completed the tests successfully, it’s time to upload it. If you haven’t altered any of the installation paths when installing DesktopServer, then you should find the themes folder located inside the website folder, in the Documents directory.

Documents>Website>Themes>Test Themes

Make a copy of the Test Themes folder to your desktop or wherever else you prefer. Now, compress this folder using Winrar or 7-Zip

Go to DesktopServer and install this zip file just as you did with the Underscores theme. 

And there you have it, your very own WordPress theme!

We hope by following these steps, you’ll be able to create your desired theme and gain some experience using WordPress. Good luck and have fun!

The post Quickstart Guide on How to Develop WordPress Themes appeared first on Zac Johnson.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home