beginners-guide-to-wordpress-theme-development

Beginner’s Guide to WordPress theme development!

Thank you for checking out the Beginner’s Guide to WordPress theme development. This guide is focused primarily on beginners, assuming the readers don’t have any prior experience with WordPress or PHP development. But it’s essential that they should have a basic idea of HTML/CSS in order to get through this. Now, let’s see what will be covered in this guide:

  • A fairly basic WordPress introduction
  • Programming language of WordPress
  • WordPress Coding!!!
  • How PHP works?
  • WordPress Codex
  • WordPress starter themes
  • Next steps…

Without further ado, let’s get into it!

WordPress Introduction

If you are looking to learn about WordPress theme development, you probably already a bit about what WordPress is, but here goes the introduction anyways. WordPress is an open source CMS (Content Management System) or/and a blogging platform. WordPress was primarily focused on blogging, but it can be extended into anything. With the latest developments in WordPress plugins and themes, you can create almost any kind of website using WordPress. A collection of great website is available here.

Programming language of WordPress

WordPress uses multiple programming languages to provide security and best experience to it’s users. But one “main” language is PHP. WordPress also uses HTML, CSS and Javascript. WordPress provides pre-built functions to access the data from database. HTML and CSS is used to display and style the data. Javascript is used to add interactivity on pages like Sliders etc.

WordPress Coding

The main thing to understand is that there’s no such thing as “WordPress Coding”. There are all kind of functions one could use to access the data pre-built in WordPress from a community of great developers. Theme developers can access those functions, get data, style and present data as per the design.

How PHP works?

As this is a simple guide for beginners, so we won’t be going into depth with this. PHP is a server side language and it needs a server to run on. The development in PHP is done using a local server environment. The best and easy way to setup a local server is via using XAMPP or WAMP.

The below line of code will be a typical example of outputting a simple line/string on the screen.

<?php echo "Hello, World!"; ?>

<?php ?> are the PHP opening and closing tags. All the PHP code goes inside these two tags. There are couple more ways to start a PHP code section and a good tutorial for getting comfortable with PHP syntax is at W3School.

PHP in WordPress can sound a little bit different from the basic tutorials. For example:

<?php $blog_title = get_bloginfo( 'name' ); ?>

The above line of code returns the blog/website’s name, which you set form the WordPress Dashboard or at the time of installation.

That’s pretty much it for PHP. You can follow the basic PHP tutorial here to learn more.

WordPress Codex

WordPress Codex is an ultimate guide for WordPress Developers. It contains every functions and template tag that can be used to develop themes. WordPress Codex also contains links to very useful resources, code snippets, tutorials and plugins to help developer through the development process.

WordPress Codex is very useful, I refer to it almost every time I start working on WordPress. But this won’t be wrong to say that a lot of tutorials are not meant to be for beginners as they are written in a technical manner. So, trying things out on a live site would be a disaster. I recommend you setup a local development environment for WordPress to test these things and develop your first theme.

WordPress Starter Themes

WordPress starter themes are a great way to start a brand new theme with. Starter themes provide multiple ways to start development in WordPress. Some of them offer a selection of template tags on which you can build and design almost anything. While other, known as framework themes, provide a rapid development opportunity, often using a simple drag & drop functionality to organize ready made templates.

Below is a list of some of the best wordpress starter themes, that I’ve used in my personal projects.

Next Steps…

When you go through all the basic steps and want to take your WordPress game a step further, I recommend this WordPress Theme Development Course by Team Tree House.

If you have any questions or need guidance getting started, feel free to comment below and I’ll try to reply to all comments.