Make your Own WordPress Theme – Part 1

After I released my first WordPress theme to public, I make another theme for my site, CypherFS Royale . Then an idea sparkling into my head. Why not I make a tutorial on how to make WordPress theme to public? I’m sure there are many peoples are looking to make their own theme for their website. So lets get started.

But before we proceed, I want to tell you first that this tutorial only covers on how to set the layout and the tags or functions needed to make your WordPress theme works perfectly. It is really basic. I will not teach you html, css and php here. You need to learn them by yourself. There are many tutorials available on the net. I’m sure you can found them in ease.

Ok, I split this tutorial to 7 parts. Here are some details for each part.

Let’s begin the Part 1 – The Layout.

The best thing in using WordPress is we can divide our theme into section. Eg: header.php, index.php, etc. But before that, we need to create our theme layout first. To do it, we start with blank html file. Btw theme that we will make here is two columns theme.

MyOWT---Part-1

Now open your favourite text editor such as Notepad. For me, I use EditPlus. It is easy to use and each tag has each colour code. After you open your text editor, we start building the layout.

Type this into your text editor and save it as index.html.

<html>
<head>
<title>My WordPress Theme</title>
</head>
<body>

</body>
</html>

That is really basic. Now we are going to create sections in our index.html file. We will use <div> tag here. So prepare your CSS to beautify your theme. Ok now we put in the <div> tags.

<html>
<head>
<title>My WordPress Theme</title>
</head>
<body>
<div id="wrapper">

<div id="header">
header
</div> <!-- close header -->

<div id="content">
<div id="main">
main
</div> <!-- close main -->
<div id="sidebar">
sidebar
</div> <!-- close sidebar -->
</div> <!-- close content -->

<div id="footer">
footer
</div> <!-- close footer -->

</div> <!-- close wrapper -->
</body>
</html>

As you can see from the code above, I end the close div tag with a comment to make me easier to trace the close div tag belong to which div’s id.

Ok now we have the sections that we want. The next thing that we will do is to divide each section to their own PHP file. This will save our time if we want to edit our theme in the future. PHP files that we will create are:

  • header.php – contains the header
  • index.php – our main file
  • sidebar.php – sidebar section will be here
  • footer.php – our footer file

Now divide the sections to their own file. Copy and paste them into each file. Make sure to save them in .php extension. Each file will looks like this.

header.php

<html>
<head>
<title>My WordPress Theme</title>
</head>
<body>
<div id="wrapper">

<div id="header">
header
</div> <!-- close header -->

<div id="content">

index.php

   <div id="main">
main
</div> <!-- close main -->

sidebar.php

   <div id="sidebar">
sidebar
</div> <!-- close sidebar -->

footer.php

  </div> <!-- close content -->

<div id="footer">
footer
</div> <!-- close footer -->

</div> <!-- close wrapper -->
</body>
</html>

Next, Part 2 – Header.

In the real exams of 350-001, people do learn to make wordpress themes. However it is not until you have done your VCP-310 as well as 640-802, that your work reeks of finesse. There can be work produced by 70-290 as well as 70-291 but that is basically crude.

Comments

  1. hi tahnk you

  2. Tima kasih om.. om bnyk membantu.. saya dari indonesia jauh dtg kemari mahu belajer buat werdperees

  3. nice, tutorial…

    i’ll try it…

  4. great tutorial bro, you really go out of your way sharing this great stuff. btw do you do customize wp themes for special needs? thanks

  5. thank you for your comment

  6. Plumes of smoke filled the sky as the pace of the air strikes escalated, forcing terrified residents to flee the coastal city, 160 kilometres south of the rebel stronghold of Benghazi. “We entered the town,” Colonel Mohammed Ehsayer, who defected from the army to join the rebellion against Gaddafi, said at a rebel outpost a few kilometres east of the city. “Soon the eastern and western gates (entry roads) will fall,” he said referring to positions still in the hands of loyalist forces, with the uprising now in its fifth week.

  7. best price and free shipping

  8. Online Black Friday Sale Black Friday Best Deals

  9. hi tahnk you nice, tutorial…

    Thank

  10. thankyou…salam

  11. ddd gh g

  12. would really appreciate if you provide us the same excellent tutorial about making

  13. I created a new wordpress site and I don’t have a good design yet

  14. Great tutorial.It helped me a lot to create my own wordpress theme

  15. Indihit says:

    I’ve been looking for tutorial like this….step by step and clear. Finally i found it here… :D

    thanks a lot

  16. nice 1 :) very easy to understand …

  17. Nice nice tutorial, very easy to understand. I will definitively have a look at the other ones ! thanks for sharing your knowledge !

  18. WP seems to be is a great CMS, I will have a look at it and try your tutorial. Thanks !

  19. thank you these article very usefull for me

  20. Have you ever thought about publishing an e-book or guest authoring on other sites? I have a blog based upon on the same information you discuss and would really like to have you share some stories/information. I know my subscribers would enjoy your work. If you are even remotely interested, feel free to send me an e mail.

  21. great theme.. it works….

  22. Excellent! Your article has a ton readers. How did you get so many viewers to look at your site I’m jealous! I’m still studying all about posting articles on the web. I’m going to look around on your blog to get a better understanding how to get more visable. Thank you!

  23. i war not user to comment you this article.. but i want to say that.. we want see your new articles on this blog.. see you..

  24. Well, I am so excited that I have located your post because I have been searching for some information on this for almost three hours! You’ve helped me a lot indeed and by scaning this post I have found many new and useful info about this subject!

  25. Thank you for any other informative website. The place else may just I get that kind of information written in such a perfect manner? I’ve a challenge that I’m just now operating on, and I have been on the look out for such info.thanks

  26. nice portfolio i really appriciate it

  27. i war not user to comment you this article.. but i want to say that.. we want see your new articles on this blog.. see you..

  28. websites

  29. Film hd izle.org | HD kalitesinde hd film izle, film izle, sinema izle, online film izle, full yerli yabancı bedava film izleyin.

  30. Nice tutorial. I will try my first wordpress theme today :) Sure your info will help !

  31. Great tutorial! I’m going to try creating my own theme now – or at least try :D

  32. Thank you for this – want to try this out, thanks!

  33. thank you for your submission, this is very helpful at all ..

Speak Your Mind

*