Basic WordPress Knowledge

Theme Structure

If you want to create a WordPress theme, these following files must be included in order to be a standard theme. You can create a theme using fewer files but this is the way to do it.

header.php – header section
index.php – main section
sidebar.php – sidebar section
footer.php – footer section
single.php – post template
page.php – page template
comments.php – comments template
search.php – search content
searchform.php – search form
archive.php – archive
functions.php – special functions
404.php – error page

The Loop

You will often see “the loop” as reference in many tutorials or samples. This piece of code helps you display
your posts on a blog. By entering custom HTML or PHP code inside the loop, you will make every post to
benefit from that custom code. You can use the loop mainly in your index.php file but also in other files
when you want to display multiple posts

 

Template Bloginfo Tags

These tags are used to display information regarding your blog, information that can be customized inside
the WordPress Administration panel.

 

WordPress Conditional Tags

 

Common WordPress Tags

As you know WordPress has a lot of code that can be embedded in themes in order to make them complex
and powerful. Here are some of the common snippets that are used in most of the templates.

 

Custom Template File

In WordPress you can insert any additional template file that is none of the ones in the first section. In this
way you can make your own template file and embed it in your theme.

 

I, Dayanand Saini,the founder and chief editor of www.webtechsource.com,have been working as a software engineer from last 4+ years. It's my hobby to learn new things and implement on live environment.

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 1 =

%d bloggers like this: