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.

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.

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

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

< ?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 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.