Many People want to create the wordpress theme. But they dont know where to start and how to start. For creating the wordpress theme only two files are important. First file is style.css file and index.php file if you create that only two files in your wordpress theme folder than also you can able to create the wordpress theme easily.
Here I will show you which is necessary files in wordpress theme folder.
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
If you have very basic knowledge of php then you are able to create Above files very easily. In index.php file you need the PHP loop for showing the wordpress posts.
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(__('(more...)')); ?>
// Custom HTML & PHP code
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
Using above code you can show the wordpress posts in your wordpress theme. Just you need to put above code in right place where you want to show the multiple posts.
Then Cut the header part of index.php file and put in header.php file and put < ?php get_header(); ?>
instead of deleted header part.
Then Cut the sidebar part of index.php file and put in sidebar.php file and put < ?php get_sidebar(); ?>
instead of deleted sidebar part.
Then Cut the footer part of index.php file and put in footer.php file and put < ?php get_footer(); ?>
instead of deleted footer part.
In single.php file you need to copy paste the index.php file and then put following code in the loop for showing the comments.
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(__('(more...)')); ?>
// Custom HTML & PHP code
<?php endwhile;
comments_template();
?>
<?php else : ?>
<?php endif; ?>
Above tags we called as template tags in wordpress api and themes.
In header.php file following lines or code is important. For title, description for blog home, theme url following code is useful. Following tags we called as “Template Bloginfo Tags”.
Where you want to show the title use following code.
< ?php bloginfo('name'); ?> - Title of the blog
< ?php bloginfo('charset'); ?> - Displays the character set
< ?php bloginfo('description'); ?> - Displays the description of the blog
< ?php bloginfo('url'); ?> - Displays the address of the blog
< ?php bloginfo('rss2_url'); ?> - Displays the RSS URL
< ?php bloginfo('template_url'); ?> - Displays the URL of the template
< ?php bloginfo('pingback_url'); ?> - Displays the pingback URL
< ?php bloginfo('stylesheet_url'); ?> - Displays the URL for the template's CSS file
< ?php bloginfo('wpurl'); ?> - Displays URL for WordPress installation
< ?php bloginfo('name'); ?>
Common and very useful wordpress theme tags as follows.
< ?php the_time() ?> - Displays the time of the current post < ?php the_date() ?> - Displays the date of a post or set of posts < ?php the_title(); ?> - Displays or returns the title of the current post < ?php the_permalink() ?> - Displays the URL for the permalink < ?php the_category() ?> - Displays the category of a post < ?php the_author(); ?> - Displays the author of the post < ?php the_ID(); ?> - Displays the numeric ID of the current post < ?php wp_list_pages(); ?> - Displays all the pages < ?php wp_tag_cloud(); ?> - Displays a tag cloud < ?php wp_list_cats(); ?> - Displays the categories < ?php get_calendar(); ?> - Displays the calendar < ?php wp_get_archives() ?> - Displays a date-based archives list < ?php posts_nav_link(); ?> - Displays Previous page and Next Page links < ?php next_post_link() ?> - Displays Newer Posts link < ?php previous_post_link() ?> - Displays previous link
With this article I attached the very useful wordpress 3.0 help functions list. Please download that also.
wordpress functions and theme help






I really loved this post. You write about this topic very well. I really love your blog and I will definetly bookmark it! Keep up the interesting posts!
Great post! I started following your blog about a month ago and I like your honesty. Good example to emulate.