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
I hate those small evil graphics
If you want to put an end to those annoying smilies that replace your text in posts & comments, follow the next instructions.
First, what are smilies?
Smileys, also known as “emoticons”, are little faces that help you display various emotions. Text smileys are created by typing two or more punctuation marks like :) and :-(
Here is the full list of smilies in WordPress
| icon | text | text | full text | icon | full text |
|---|---|---|---|---|---|
| :) | :-) | :smile: | :lol: | ||
| :D | :-D | :grin: | :oops: | ||
| :( | :-( | :sad: | :cry: | ||
| :o | :-o | :eek: | :evil: | ||
| 8O | 8-O | :shock: | :twisted: | ||
| :? | :-? | :???: | :roll: | ||
| 8) | 8-) | :cool: | :!: | ||
| :x | :-x | :mad: | :?: | ||
| :P | :-P | :razz: | :idea: | ||
| :| | :-| | :neutral: | :arrow: | ||
| ;) | ;-) | :wink: | :mrgreen: |
How do I get rid of them?
It’s actually pretty easy. All you got to do is go to your admin panel -> Settings -> Writing where you will see the following checkbox:
Uncheck the check box that says “Convert emoticons like :-) and :-P to graphics on display” just like in the image above and click “Save Changes”.
How to replace them
If you want to keep the smilies but you don’t like the current set of smilies you can change them.
Open your FTP program (I use FlashFXP) and upload (overwrite) your custom smilies to /wp-includes/images/smilies.
Looking for more information? Check out the WordPress codex page on smilies.
What about you, do you like them? I just prefer the plain text, it makes it easier to understand. :P
- wordpress disable smilies
- disable emoticon wordpress
- wordpress no emoticons
- wordpress disable smileys reply
- wordpress disable emoticons in comments
- wordpress disable emoticons
- smileys wordpress full text
- remove smileys wordpress comments
- remove emoticon from comment wordpress
- disable wordpress smilies
My No Meta WordPress Plugin finally got his own WordPress dot Org page.
Now I’m waiting for my Mass Custom Fields Manager to get approved.
I always wanted to have my own plugin page :). It just makes me proud to be an owner of an open-source plugin.
Howto get a WordPress plugin page
In order to get a plugin page at WordPress.org (like http://wordpress.org/extend/plugins/plugin-name-here) you need to do a couple of things as described below:
- Think about a good idea for a WordPress Plugin.
- Develop the plugin yourself / hire a developer to code the plugin for you / contact me and ask me to code the plugin for you.
- Register as a member at WordPress.org
- Ask WordPress to host your plugin.
- Grab yourself some cookies & milk and wait until they send you an email saying they approved your plugin (Usually within one week). If you receive an email saying that they didn’t approve your plugin then… Well I have no idea because I never got one.
- The email will say that you will receive access to your SVN within the next hour so this step is just more waiting :(.
- Once you got your access, read this tutorial on How to Use Subversion to upload your plugin (=get a plugin page), and upload your plugin files to the
/trunkfolder. If you encounter any problems with this step like I did (this is the toughest step), contact me through the contact page or by leaving a comment and I’ll get back to you + Update this post with the solution so it helps other people as well. - Wait up to fifteen minutes (WordPress checks for updates every 15 minutes) for WordPress to create your plugin page and then use the WordPress plugin search to find it.
- Be pround of yourself and comment here to let me & other people know that this tutorial works.
Frequently Asked Questions
- No questions yet :).
I hope this guide will help some people to get started with WordPress plugin developing, because it’s just amazing what you can do with it. The way that WordPress was built lets you change virtually anything and tweak the system in any way you want.
Search terms:- every time count the page when open website in wordpress
- how to get a wordpress plugin on a page
- how to get to plugins page on wordpress
- wordpress own plugin add waiting button
- wordpress plugin add button to page
- wordpress plugin get pages
- wordpress website tutorial


