Create your own WordPress theme from scratch [Part 3]

In last part we have coded index.php and header.php,  here we will code content.php, this page will display the posts and search results, and posts under categories, pages , etc.

here is the code for content.php

The above code looks to0 complicated, let me break it for you line by line. Continue reading Create your own WordPress theme from scratch [Part 3]

Create your own WordPress theme from scratch [Part 2]

Here is a basic theme idea, how the things are gonna be arranged in the theme.

basic wordpress theme layout

First, create a empty folder in wordpress’s main directory -> wp-content -> themes, name the new folder as testtheme.

Now create a new css style sheet named style.css and add the below code to it and save it to empty folder of theme.

That css page adds the description and info about theme to wordpress dashboard, that code basically works as theme description. Now, you can see that your new theme is available to be activated from dashboard. Don’t activate it yet, as there no other files in the folder except for the style.css page. Continue reading Create your own WordPress theme from scratch [Part 2]