A theme consists of many files, this can get very confusing very fast. What files are needed? What files runs when and why? Here are the explanations and tips about WordPress template files.
First things first, what is a template exactly? A template is a PHP file that is a part of a theme. For example, there is a template for displaying the home page, one for displaying pages and another one for displaying posts.
What Are The Existing WordPress Tempaltes?
Here is a list of the existing WordPress templates that can be used in themes:
- index.php – The master template. If a certain template file does is not found, this one is being used.
- home.php – Displays the home page.
- page.php – Displays page’s page (It displays my contact page).
- single.php – Displays the post’s page (This is what you are now viewing if you are reading this here).
- author.php – Displays the author page. This is not such a common template as most themes don’t use author pages.
- tag.php – Displays the posts which have a specific tag. (e.g. FTP)
- category.php – Displays posts from a specific category. (e.g. WordPress)
- date.php – Displays posts from a specific time range.
- archive.php – Used if tag.php,category.php or date.php is not found.
- search.php – Displays search results. (e.g. How To)
- 404.php – When WordPress sends a 404 header. (When it cant find something)
- image.php,video.php,audio.php,application.php or any other first part of the attachment’s MIME type – Attachment.
- attachment.php – If one of the last templates (image.php…) are not found.
Here is a very useful image provided by WordPress Codex (click to enlarge):
Custom Templates
There are two main types of custom WordPress templates.
The first one are templates that WordPress looks for automatically, and if one is found it will be used. What the heck am I talking about?
If you have a category called “News” with the ID of 512 and you want the archive page of that category to have it’s own unique template you can create a new template file called category-512.php in the theme’s folder. And WordPress will use it.
This is the list of custom wordpress templates you can use:
- category-id.php
- tag-slug.php
- pagename.php
- firstpartoftheattachmentsMIMEtype.php

Now for the second type of WordPress custom templates.
Let’s say you have more then one page* you want to be displayed in a different way then the others. How do you do that?
Create a new file called whatever.php at your theme’s folder and inside write whatever you want instead of single.php or index.php (depending what displays the single posts at your theme).
Add this comment to the top of the file:
<?php
/*
Template Name: The Whatever Template Yo
*/
?>
(Of course change The Whatever Template Yo to the new template’s name)
Now edit (or create) the pages which you want to use this template and in the right side pick the desired template from the drop down menu. Just like in the screenshot at the right side.
*If you want to do this for posts rather then pages then you will find the Custom Post Template plugin very useful.
Any questions/corrections? Comments are always welcome.
Search terms:- wordpress template guide
- wordpress date php template
- 3590: String used where a Boolean value was expected The expression will be type coerced to Boolean in <mx:Image />
- wordpress custom templates
- it templates
- how to write song lyrics example
- wordpress templates guide
- attachment php wordpress
- attachment php wordpress 404
- date php wordpress template

Do you get “jQuery is not defined” as an error after a fresh WordPress Install? JavaScript not working at your admin panel? Don’t worry, I have the solution.
After installing two new WordPress installations with defective admin JavaScript that won’t allow me to
- Open the menus (in the admin panel’s left side)
- See the post editors toolbar
- Install new plugins
- Install new themes
I understood I was having some kind problem with the Javascript jQuery library.
I deactivated all the plugins and nothing happened. Then I started looking at the source code and googeling for quite a long time. After some serious research I discovered what caused the issue.
The Problem
While uploading the WordPress installation files onto the server I had some issues that cause some of the JavaScript files to not be uploaded / be corrupted.
The Solution

Re upload the wp-includes\js folder and overwrite whatever is in there.
That’s what fixed it for me.
I hope this helped someone, if it does, or does not – comment to help or get help.
Search terms:- wordpress jquery is not defined
- jQuery is not defined wordpress
- jquery is not defined
- $ is not defined
- wordpress jquery not defined
- jquery is not defined error
- jquery not defined wordpress
- wordpress jquery error
- wordpress admin jquery is not defined
As you can see in the WordPress download page and blog, WordPress 2.8.1 has been released as a stable version to the public.
WordPress 2.8.1 fixed many bugs and security issues that version 2.8 suffered from.

What’s New?
Here are the highlights from the WordPress blog (you can also look at the whole list of new stuff in 2.8.1):
- Certain themes were calling get_categories() in such a way that it would fail in 2.8. 2.8.1 works around this so these themes won’t have to change.
- Dashboard memory usage is reduced. Some people were running out of memory when loading the dashboard, resulting in an incomplete page.
- The automatic upgrade no longer accidentally deletes files when cleaning up from a failed upgrade.
- A problem where the rich text editor wasn’t being loaded due to compression issues has been worked around.
- Extra security has been put in place to better protect you from plugins that do not do explicit permission checks.
- Translation of role names fixed.
- wp_page_menu() defaults to sorting by the user specified menu order rather than the page title.
- Upload error messages are now correctly reported.
- Autosave error experienced by some IE users is fixed.
- Styling glitch in the plugin editor fixed.
- SSH2 filesystem requirements updated.
- Switched back to curl as the default transport.
- Updated the translation library to avoid a problem with mbstring.func_overload.
- Stricter inline style sanitization.
- Stricter menu security.
- Disabled code highlighting due to browser incompatibilities.
- RTL layout fixes.
Should I Upgrade?
I already upgraded and It took about two seconds. No plugins harmed.
I think that everyone should upgrade because of the security problems in 2.8.1.
Did you update?
The second WordPress 2.8 beta is now live for download.
You can download WordPress 2.8 beta 2 and see the list of changes on the WordPress.org development blog.
This is mainly for people who want to contribute to WordPress in another fashion by downloading the beta, using it and reporting bugs. I took a look at the list for you and there is really nothing particularly interesting, just some plain bugs & issues. I also found a cool view on the bugs, one that lets you see the changes in the files themselves.
What about you guys, Did you try the 2.8 WP beta?

WordPress developers at WordPress.org announced the release of the WordPress 2.8 beta version for the open public. They also stated the main features and updates such as:
- New Theme Installer routines
- Improved Widget user interface
- Allow editing of all plugin files
- “Choose a city in the same timezone as you” for Timezone in Administration > Settings > General
- Remove My Hacks option from Administration > Settings > Miscellaneous
- Hide email addresses from low privilege users on Administration > Comments
- Allow case-insensitive logins
- Add password strength meter to Add User and Edit User
- Drop post_category column from wp_posts table, and link_category column from wp_links schemas
- Add hooks for the Users, Categories, Link Categories, Tags and Comments table columns
- Put page title before blog name in admin title
- Fixes to query_posts (obey post_type, drop orderby=category, use group by for meta key queries, remove meta_value from selected fields)
- Add hook for adding info to plugin update message
- Add a function to output a generic widget anywhere in a template
- New Widgets API
- Allow menu reordering via plugin
I read the whole list and pointed the things that I think are most important here.
WordPress 2.8 Beta 1 Download Link
You can get the beta version and test it at WordPress.org.


