wordpress theme help for wordpress developers

Many People want to create the wordpress theme. But they don’t know where to start and how to start. We given wordpress theme help for wordpress developers. 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.

wordpress theme help for wordpress developers

Here I will show you which is necessary files in wordpress theme folder.

01header.php - header section
02index.php - main section
03sidebar.php - sidebar section
04footer.php - footer section
05single.php - post template
06page.php - page template
07comments.php - comments template
08search.php - search content
09searchform.php - search form
10archive.php - archive
11functions.php - special functions
12404.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.

1<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php if(have_posts()) : ?>
2   <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php while(have_posts()) : the_post(); ?>
3<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_title(); ?>
4<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_content(__('(more...)')); ?>
5// Custom HTML & PHP code
6   <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php endwhile; ?>
7<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php else : ?>
8<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->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.

01<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php if(have_posts()) : ?>
02   <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php while(have_posts()) : the_post(); ?>
03<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_title(); ?>
04<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_content(__('(more...)')); ?>
05// Custom HTML & PHP code
06   <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php endwhile;
07comments_template();
08?>
09<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php else : ?>
10<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->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.

01< ?php bloginfo('name'); ?> - Title of the blog
02< ?php bloginfo('charset'); ?> - Displays the character set
03< ?php bloginfo('description'); ?> - Displays the description of the blog
04< ?php bloginfo('url'); ?> - Displays the address of the blog
05< ?php bloginfo('rss2_url'); ?> - Displays the RSS URL
06< ?php bloginfo('template_url'); ?> - Displays the URL of the template
07< ?php bloginfo('pingback_url'); ?> - Displays the pingback URL
08< ?php bloginfo('stylesheet_url'); ?> - Displays the URL for the template's CSS file
09< ?php bloginfo('wpurl'); ?> - Displays URL for WordPress installation
10< ?php bloginfo('name'); ?>

Common and very useful wordpress theme tags as follows.

01< ?php the_time() ?> - Displays the time of the current post
02< ?php the_date() ?> - Displays the date of a post or set of posts
03< ?php the_title(); ?> - Displays or returns the title of the current post
04< ?php the_permalink() ?> - Displays the URL for the permalink
05< ?php the_category() ?> - Displays the category of a post
06< ?php the_author(); ?> - Displays the author of the post
07< ?php the_ID(); ?> - Displays the numeric ID of the current post
08< ?php wp_list_pages(); ?> - Displays all the pages
09< ?php wp_tag_cloud(); ?> - Displays a tag cloud
10< ?php wp_list_cats(); ?> - Displays the categories
11< ?php get_calendar(); ?> - Displays the calendar
12< ?php wp_get_archives() ?> - Displays a date-based archives list
13< ?php posts_nav_link(); ?> - Displays Previous page and Next Page links
14< ?php next_post_link() ?> - Displays Newer Posts link
15< ?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 3.0 Cheat Sheet wordpress theme help for wordpress developers
wordpress functions and theme help wordpress theme help for wordpress developers

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.