Developing for WordPress

Right now I am developing a WordPress theme for my portfolio website. Originally I had been trying to instal Drupal, but that didn’t go very well. After multiple bugs I finally gave up in frustration and switched to WordPress. In this post I will be writing about what I’ve done since I gave up on Drupal.

First, I installed WordPress (WP) on my server. Yes I know, I am developing live which is bad practice… I’m pretty sure though that not many people visit my portfolio site very much at present. I hardly have it linked anywhere. Anyway, pretty much the only thing I had to do to install WP was to download the latest version, and then upload the files via FTP to my root directory. After that all I had to do was navigate to my root url and follow the WP set-up prompts.

Next came the interesting part. I wanted to develop my own theme, but I no idea where to start. So, I found a pretty basic looking free theme called “Responsive,” and started playing around with it. After some surfing of the web, this led me to create a child theme for Responsive. A child theme will inherent the functionality of  its parent theme, unless it has it has code of it’s own. In the cases where code can be found in the child theme, that code is used. For details on creating a child theme, see the WordPress Codex. At first basing my own child theme off of Responsive worked quite well, but navigating and trying to make all of Responsive’s behaviors do what I want them to do is getting a bit complicated. Switching to a theme like Boilerplate would be a good idea, but I figured that I would mess around with Responsive enough to become savvy at working with WP, get a sort of hacky solution up and running, and then clean up my code a lot by switching to Boilerplate.

Developing a basic WP theme is actually not very complicated. Each type of page is controlled by a specifically named php file. For example, page.php controls page behavior, and index.php controls the front page behavior. Style.css is your overall styling file. (One thing I found that I thought was pretty weird was that you have to include a specially formatted comment at the top of each of your files.)  Below is a useful info graphic:

anatomy of a WordPress site.

Back to fiddling with php files…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s