WordPress is a great tool of of the box but you need WordPress theme development when things aren’t quite right

It’s entirely possible for a WordPress theme to handle 99 percent of what you want it to do but there are those times when it can’t handle that last one percent. This happens when you want to modify an aspect of your site but the WordPress backend won’t let you do it. The capability you need is missing. For example maybe the header is too deep and the theme doesn’t allow you to cut it down.

When this happens you’re into editing the theme itself. This means going into the actual files and editing them to get the results you need. WordPress is made up of dozens of files and it can be daunting to figure out what file to change. If you need someone to do this reasonably and quickly call us!

1. The Two Primary WordPress File Types

There are two types of files in a WordPress site: PHP files and CSS files. PHP files are the actual programming files. CSS files are the formatting files. Of the two, I look at the CSS files first. Sometimes a minor change to a CSS file is all that is needed. CSS file changes impact the site very little.

When changing a CSS file doesn’t work, you’re into modifying the PHP. Modifying the PHP is actually changing the underlying code of the web site. It is easy to mess things up royally. Many times a change made to a PHP file will manifest on other pages of the site often times with bad results.

2. Modifying PHP – The Underlying Code

Modifying PHP on a WordPress is often tricky because there is rarely a direct correlation between the web page and its underlying PHP script. PHP programming can be tricky for two reasons:

1. PHP programmers use include files. An include file is a file that gets called into other programs. When you go to modify a theme you have to follow the trail of include files and make a determination of what file does what before making any changes. It can take a while to figure out how the site’s include files are structured.

2. The filename the site presents to the Internet has little to do with the filename of the script that created the web page. WordPress uses a tricked out technique called perma-links to present a fictitious filename to the web. This is primarily for search engine purposes. From a programming perspective the filename of the web page (the URL) has little to do with the PHP file you need to edit.

The first step in reprogramming a theme is to find the right file and then the right location within the file to change. This is harder than you think. The goal as a PHP programmer is to make the correct change, once, and to be able to put the site back to its original condition if is doesn’t work out.

3. WordPress Theme Development Basics

Wordpress makes wonderful sites. The themes offered for sale are 99 percent correct. However WordPress sites are complicated. When working on the underlying files the main thing is to not break the site. Once you break the site chances are good you won’t get it back. Here are two techniques to make sure your modifications move your site in a positive direction.

1. Backup the file immediately

When you find the file you need to change, FTP it to your desktop. Then rename the file on the server using FTP. I like to put a –x after the filename indicating that I have changed the original file that came with the theme.

Modify the file locally. When done, FTP it to the server. Then test the site in the browser. If it works, you’re good. If not, you still have your original file to go back to.

2. Option drag the file on your desktop as you work on it

As you make changes, option-drag your file to copy it as you go. If it’s a major change you won’t be able to make it in one shot. Make one change, FTP it to the server, and test it. If you like it, option-drag your file to copy it. This way you essentially lock in that change. With a copy you can do no worse than your last change. Using this programming methodology you can make major theme change without ever losing ground or having to start over.

3. Location of Files

Wordpress files can be anywhere. When modifying a theme you want to:

a. FTP into the site
b. Go to wp-content
c. Go to themes
d. Find your themem

That’s your starting point for WordPress theme development.