Step 4: setting up your new theme in WordPress

Once you have all your page templates coded, you are ready to set it up in WordPress.

At the bare minimum, you should have the following templates created:

  • header.php – includes html declaration, styles, include files, opening body tags
  • footer.php – closing body tags, analytics codes
  • page.php – the main template that will call header, sidebar and footer files
  • index.php – template for displaying your posts
  • sidebar.php – self explanatory, sidebar content
  • comments.php – template for rendering comments
  • 404.php – good to have

I’m missing one more important one, for search, but I’ll add it later.

So your folder will look somewhat like this:

Then upload your theme folder to your server, into /wp-content/themes directory

Login to WordPress, and go to Appearance tab.

You should then see your theme show up as an option:

Click on “activate” and your theme should be up! (or do live preview first if you’re not sure)

Check your site and see if there are things to be tweaked, fix them and – voila! You’re up and running with your brand new theme! Congrats :)

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 )

Facebook photo

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

Connecting to %s