Getting Started Receive Updates For This Category
June 2, 2011 Site Design and Layout 0 1
Introduction
GUsually, plugin and theme authors need to provide access to a settings (options) screen so users can customize how the plugin or theme is used. The best way to present the user with such a screen is to create an administration menu item that allows the user to access that settings screen. This article explains how plugin authors can add administration menus and screens. Note: the following information assumes a knowledge of the basics of Writing a Plugin and using the Plugin API of Actions and Filters.
Every Plot Needs a Hook
To add an administration menu, you must do three things:
- Create a function that contains the menu-building code
- Register the above function using the 8220;admin_menu8221; action hook
- Create the HTML output for the page (screen) displayed when the menu item is clicked
It is that second step that is often overlooked by new developers. You cannot simply call the menu code described; you must put it inside a function, and then register the function.
Here is a very simple example of the three steps just described. This plugin will add a sub-level menu item under the Settings top-level menu, and when selected, that menu item will cause a very basic screen to display. Note:this code should be added to a main plugin PHP file or a separate PHP include file.
In this example, the function, my_plugin_menu(), adds a new item to the Administration menu via the add_options_page function. Note: more complicated multiple menu items can be added, but that will be described later. Notice the add_action line8211;that invokes the hook which 8220;registers8221; the function, my_plugin_menu(). Without that add_action, a PHP error for 8220;undefined function8221; will be thrown when attempting to activate the plugin. Finally, the add_options_page code refers to the my_plugin_options() function which contains the actual page to be displayed (and PHP code to be processed) when someone clicks the menu item.
The actual detail of these processes is described in more detail in the sections below. Remember to enclose creation of the menu and the html page in functions, and invoke the admin_menu hook to get the whole process started!
Determining Location for New Menus
Before creating a new menu, first decide if the menu should be a top-level menu, or a sub-level menu item. A top-level menu displays as new section in the administration menus and contains sub-level menu items. A sub-level menu means the menu item is a member of an existing menu.
It is rare that a plugin would require the creation of a top-level menu. If the plugin introduces an entirely new concept or feature to WordPress, and needs many screens to do it, then that plugin may warrant a new top-level menu. Adding a top-level menu should only be considered if you really need multiple, related screens to make WordPress do something it was not originally designed to accomplish. Examples of new top-level menus might include job management or conference management. Please note with the native post type registration, WordPress automatically creates top-level menus to manage those features.
If the creation of a top-level menu is not necessary, decide under what top-level menu to place your sub-level menu item. As a point of reference, most plugins add sub-level menu items underneath existing WordPress top-level menus. For example, the Backup plugin adds a sub-level menu option to the Tools top-level menu. Please note with the taxonomy registration, WordPress automatically creates sub-level menus under the applicable top-level menu to manage those features.
September 5, 2011 Getting Started, WordPress Lessons 0 0
You can say or show the world anything you like on your WordPress site. Here are some tips you need to know to help you write your posts in WordPress.
Practice Accessibility
- To be compliant with web standards for accessibility, be sure to include ALT and TITLE descriptions on links and images to help your users, such as <a title="WordPress Codex" href="http://codex.wordpress.org/">WordPress Codex</a>.
Use Paragraphs
- No one likes to read writing that never pauses for a line break. To break your writing up into paragraphs, use double spaces between your paragraphs. WordPress will automatically detect these and insert <p> HTML paragraph tags into your writing.
Using Headings
- If you are writing long posts, break up the sections by using headings, small titles to highlight a change of subject. In HTML, headings are set by the use of h1, h2, h3, h4, and so on. By default, most WordPress Themes use the first, second, and sometimes third heading levels within the site. You can use h4 to set your own headings. Simply type in:
- <h4>Subtitle of Section</h4>
- with double lines before and after and WordPress will make that title a headline in your post. To style the heading, add it to your style.css style sheet file. For more information on styling headings, check out Designing Headings.
Use HTML
- You don8217;t have to use HTML when writing your posts. WordPress will automatically add it to your site, but if you do want control over different elements like boxes, headings, and other additional containers or elements, use HTML.
Spell Check and Proof
- There are spell check Plugins available, but even those can8217;t check for everything. Some serious writers will write their posts in a text editor with spell check, check all the spelling and proof it thoroughly before copying and pasting into WordPress.
Think before you post
- Ranting on blogs is commonplace today, but take a moment and think about what you are writing. Remember, once it is out there, it can be seen by many and crawled by search engines; and taking things back is harder once it is public. Take a moment to read what you8217;ve written before hitting the Publish button. When you are ready, share it with the world.
Write about what you like
- You’ve heard this a thousand times before and it sounds too cliched, but it is true. If you force yourself to write something that you don’t really enjoy, it will show. Perhaps you might not have a specific theme for writing when you just start, but that’s ok. You’ll become more focused later. Just enjoy the experience and write what you like.
Write frequently
- Write as frequently as you can, may be even more than twice a day, but don’t let quantity get in the way of quality. Your viewers come for content, don’t give them useless stuff.
Don’t use too much slang
- Not all the readers will be from your part of the world so make sure people can understand easily.
Don8217;t hide your emotions
- Tempting as it might be, don’t hide your real emotions. After all that is what a blog is about. If you want, you can stay anonymous and voice your feelings on whatever you are passionate about. You might have strong views on various subjects but let your readers know your passion. What is passion worth if you can’t even share it? You’ll actually love the discussions it can lead to. The discussions will broaden your own thinking and you might end up making some really good friends.
Consider your readers
- Perhaps this sounds weird, but consider who needs to know about your blog before you tell them about your new blogging hobby. Will you be able to write freely if you tell them? How much should you let your readers know about you? Is it ok if your boss or girlfriend reads your posts? If you don’t want them to read, take anonymity measures accordingly.
Make use of comments
- Comments let people share their ideas. Sometimes, they might not be good, but you can ask such people to shut up. Most of the times, they will and if they don’t you can delete their comments. Blogging like real life, can be both fun and not so fun at times. Be prepared. Also, give your people a place to contact you in private if they want to write to you.
Worry about blog design later
- Blog design matters, but only to an extent. Don’t give up on blogging just because the design isn’t coming up as you’ll like it it to be. Sooner or later, you’ll get around the design problems with ease. But continue writing. Content is what attracts your readers, not just the look of your blog.
Don’t play too safe
- Talk about the real you. Readers aren’t impressed by how big your house is, which cool club you belong to, or what the weather is in your hometown. Don’t be a bore and put a long post on how you fixed the leaking tap in minutes. Readers don’t care about braggers, they care about the real you8211;how you feel, what gets you excited, why you are the person you are. But if achievements are all that you can talk about, you will bore your readers.
Use pictures and videos
- They make the pages colorful and viewers get to see a little of your part of the world. They feel connected.
Keep writing
- Don’t stop blogging. If you don’t have anything to write about, chances are, you are still holding back. Let loose. Perhaps surf more blogs and maybe you’ll get an idea. You can write about your friends, complain about your boss, or simply rant about what’s gone wrong. Yet if nothing else works, just write a review on the latest movie, book, or product. Easy actually.
Save your posts
- Save your posts before you press the publish button. Anything can happen with your computer or with an internet connection. You don’t need to lose your post.
Best Practices For WordPress Posting
- Resource: http://codex.wordpress.org/Writing_Posts
June 2, 2011 Working with WordPress 0 0
Comment moderation is a feature in WordPress that allows you to prevent comments from appearing on your site without your express approval. Moderation can be very useful in addressing Comment Spam, but it has more general applications as well. If you would like to learn more about comment spam, see Fighting Comment Spam.
How Moderation Works
WordPress runs a number of tests on each new comment before posting it to your blog. If a comment fails one of these tests, it is not displayed immediately on the site but is placed in a queue for moderation, the process of manual approval or deletion by the blogs administrator.
Controlling Moderation
You can control which comments get held for moderation on your Settings Discussion SubPanel page, which is located under Settings Discussion.
If you would like every comment to be held for moderation, check the An administrator must approve the comment option, listed under Before a comment appears.
If you would like to send suspicious comments to the moderation queue, while letting innocent comments through, you will need to specify a set of rules for determining which comments are suspicious. These rules are specified in on the Settings Discussion > Comment Moderation.
The first option is to hold comments for moderation if they contain an unusually large number of hyperlinks. Most normal comments contain at most one or two links while spam comments often have a large number. Look at your own comments and set this to a value that makes sense for your audience. (Note: In version 1.5.2, and possibly others, if you do not put a number in the comment moderation links box, in other words, if this box is completely blank, all anonymous comments (and possibly others) are sent to the Manage Comments SubPanel for moderation, even if the Discussion Options Subpanel has no restrictions set.)
The second option is to specify a set of moderation keys which, if present in any part of the comment, will cause it to be held for moderation. These keys are specified one per line in the large text area, which is blank by default. Moderation keys can include Spam Words, swear words, IP addresses, and Regular Expressions.
When you add a new moderation key, its a good idea to test its validity by checking previous comments. Simply use the link entitled Check past comments against moderation list, which is located underneath the text box containing moderation keys. This asks WordPress to check previous comments and tell you which ones would be flagged for moderation under your new set of keys.
The box marked Comment blacklist works in exactly the same way as the comment moderation box, except that comments that match these words will be deleted immediately and without notification. So be careful! Genuine comments could be deleted without you ever knowing they were there.
Why Not Blacklisting?
Several weblog programs take a 8220;blacklisting8221; approach to addressing comment spam. So if you tried to leave a comment that had a word or domain that was on the blacklist, then your comment would be refused.
Why did not WordPress use this method? In formulating a way to combat the problems that people were having with comments, we made a promise at the beginning, Do no harm.
Weblogs are about communication, and anything that impedes that communication is harmful to the medium. Instead of rejecting a comment that matches a term in the moderation keys (our variation on the blacklist) we simply hold it for review. That way if it was a legitimate comment mistakenly caught by the filters, the weblog author can still see it and respond to the comment.
Of course this means that there may be a lot of comments that you do not want on your site caught in the moderation queue, and in this case we have tried to make it as easy as possible to manage large numbers of comments quickly. See the articles on Fighting Comment Spam for more information and resources.
October 26, 2011 WordPress Lessons, WordPress Themes 0 1
Custom WordPress Themes
Custom WordPress themes can be used to enhance a look of your website.
The internet has reformed the life of man. People are using the internet for their daily life activities. Whether you are shopping online, or you are just reading blogs the first thing you will need to access is the website. Website with better outlook will attract more traffic. You can customize your website, especially a blog containing websites with help of word press.
With the help of developing custom wordpress themes you can also generate money for yourself. For this purpose, you can develop your own website for promotion of custom word press themes. You can sell wordpress themes for general market and custom wordpress themes, which should be user oriented.
As an interesting website captures more traffic thus, custom WordPress themes enable websites to acquire the interesting look. You can develop custom wordpress theme for your websites by your own, or you can also acquire services of a professional web developer for this purpose. However, if you learn to develop custom wordpress theme once you are able to develop new themes more frequently.
Some important tips regarding development of custom wordpress theme includes:
- Keep the default theme of the website in your mind
- With the help of Photoshop, you can develop an idea for your custom wordpress theme.
- After developing design in Photoshop you can develop templates in HTML and CSS.
- WordPress employs different template files for one web page. These templates are saved as PHP and CSS files in the default theme folder.
- For custom wordPress themes, you need to copy files from the folder of default themes.
- You also need to incorporate HTML coding for navigation purpose.
You can create a number of custom wordpress themes with the help of learning WordPress and web page development.
You can also create more space for advertisement on your website with help of Custom WordPress themes. It can help you to make more money with your website. However, if you are using services of a professional web developer for custom wordpress themes than you can also be facilitated by developer in case of any problem.
Custom WordPress Themes
June 2, 2011 Site Design and Layout 0 0
ynamic menu highlighting is a way to give users a reference point with which to navigate. It is like the dot on the map that says 8220;you are here8221;. WordPress.org has utilized dynamic menu highlighting.
This image illustrates that the user is currently looking
at a page under the menu 8220;DOCS8221;.
By looking at the menu list you can, due to the use of the dark thick line easily ascertain that you are currently on a page within the 8220;DOCS8221; or documentation section of the site.
This article will explain how to go about making a navigation menu that dynamically highlights the currently displayed page, however there are plugins available that can do most of the work for you.
Also note that if you use the Pages sidebar widget (that comes with wordpress) to display your menu, it already has a CSS class current_page_item, which you can use to achieve the same effect. You can access it like this in your CSS:
.widget_pages li.current_page_item a{
background-image:url(images/activelink.gif);
}
Overview
There are a number of components that make dynamically highlighted navigation work. These include :
- highlighting your current location or navigation position between page loads,
- highlighting other navigation points on mouse-over,
- showing submenus of navigation, leaving a breadcrumb trail (Not in the scope of this article).
- There are also many different possible approaches to achieve dynamically-highlighted navigation. These include for example Javascript, Flash, HTML and CSS in conjunction with PHP. This article covers the CSS/PHP method.
Basic Navigation Lists
The basic navigation list might look something like this:
And there would likely be some bit of CSS in the pages stylesheet that would specifically style list items with the 8220;current8221; ID differently from other list items.
This works fine with static HTML pages, but when dealing with dynamic pages, things become a little more complicated. Perhaps this menu is supposed to be in a sites sidebar and the sidebar is contained in a single file that is called from multiple places. Obviously, as written, only one item would ever be highlighted, no matter what page is actually being viewed. That is not what we want at all!
Making the Code Dynamic
PHP allows us to add the desired highlighting effect that reacts to whatever page is being viewed. Coupled with WordPress is_ functions, we can dynamically test what page is being viewed and then rewrite the code based on the results of that test.
There are two ways to go about this. One requires us to create a variable ($current) that will always equal the page number we are on. It also requires us to put some CSS on each page instead of keeping it all in the main CSS document. The other way means a bit more of a mess with PHP, but it means we get to keep all our styling in a single CSS document.
Method One: With CSS On Each Page
The first step in this method is to remove the one id=8221;current8221; from the list and then add a unique id attribute to each list item.
The next part is where PHP comes in.
We need to write a conditional statement that will test what page is being viewed and define a variable based on the results of that test.
This piece of code uses the is_page(); function to check the title of the current page. If the title is 8220;Page One,8221; the variable $current is assigned the value of 8220;one;8221; if it is 8220;Page Two,8221; $current becomes 8220;two;8221; etc., etc. On a WordPress template, this would go in the header.php file between the
tags.
June 2, 2011 Getting Started 0 0
Most hosting providers and personal installations on Unix/Linux systems should be able to host WordPress under very common configurations
Server requirements
WordPress server requirements for Version 3.2 (Spring 2011):
- PHP version 5.2 or greater
- MySQL version 5.0.15 or greater
(Optional (required for multi-site)) Apache mod_rewrite module (for clean URIs known as Permalinks)
WordPress server requirements for Version 2.9, 3.0, 3.1:
- PHP version 4.3 or greater
- MySQL version 4.1.2 or greater
- (Optional (required for multi-site)) Apache mod_rewrite module (for clean URIs known as Permalinks)
Recommended setup
It is recommended you use a robust platform comprised of the Linux operating system, and either the Apache web-server or the NGINX web-server. Almost any server that supports PHP and MySQL will work. If your host does not support one of these platforms, and mod_rewrite, you will probably be better off switching to one of the many hosting providers that do offer those choices.
It is also essential that your host allows remote connections, for many of the WordPress features to work. If your host blocks outgoing HTTP connections, many parts of the WordPress will not function.
Recommended server setup:
- PHP version 5.2 or greater
- MySQL version 5.0.15 or greater
Hosting providers
Hosting is a commodity these days and with a little digging its easy to find a host that supports the above. If you are looking for hosting suggestions, please try:
- WordPress Recommended Hosts 8211; these hosts support WordPress, in more ways than one.
- Searching the WordPress support forums for recommendations
June 2, 2011 Working with WordPress 0 0
WordPress can be configured to use e-mail to post to a blog. To enable this functionality, you need to:
- Create a dedicated e-mail account to be used solely for posting to your blog,
- Configure WordPress to access that account, and
- Configure WordPress to publish messages from the e-mail account
You can blog by e-mail using most standard e-mail software programs or a Weblog Client 8212; a program specifically designed to send posts via email.
Limitations: 8211; Standard characters in the object 8211; Plain text only
WP-Cron Plugin Activation
Download, install, and activate the WP-Cron Plugin. It will work in the background without user intervention to update your site about every 15 minutes.
Cron Job Activation
Set up a UNIX cron job to have your blog periodically view http://example.com/installdir/wp-mail.php using a command-line HTTP agent like wget, curl or GET. The command to execute will look like:
wget -N http://example.com/installdir/wp-mail.php
If you use a different program than wget, substitute that program and its arguments for wget in this line.
Note: Another possibility is to run 8220;php /full/path/to/wp-mail.php8221; in a cronjob. This will run the php-script using php, without the need for an extra program to run. (You are more likely authorized to run php than wget.)
For more information about setting up a cron job, see:
- Intro To Cron Jobs
- Automating tasks with cron services at USAIL
- Your hosting providers FAQ or manual pages
June 2, 2011 Working with WordPress 0 0
Using phpMyAdmin
phpMyAdmin is a program used to manipulate databases remotely through a web interface. A good hosting package will have this included. For information on backing up your WordPress database, see Backing Up Your Database.
Information here has been tested using phpMyAdmin 2.8.0.2 running on Unix.
Restore Process
- Login to phpMyAdmin.
- Click databases, and select the database that you will be importing your data into.
- You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
- Across the top of the screen will be a row of tabs. Click the Import tab.
- On the next screen will be a Location of Text File box, and next to that a button named Browse.
- Click Browse. Locate the backup file stored on your computer.
- Make sure the SQL radio button is checked.
- Click the Go button.
- Login to phpMyAdmin.
- Click databases, and select the database that you will be importing your data into.
- You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
- Across the top of the screen will be a row of tabs. Click the Import tab.
- On the next screen will be a Location of Text File box, and next to that a button named Browse.
- Click Browse. Locate the backup file stored on your computer.
- Make sure the SQL radio button is checked.
- Click the Go button.
Now grab a coffee. This bit takes a while. Eventually you will see a success screen.
If you get an error message, your best bet is to post to the WordPress support forums to get help.
June 2, 2011 Getting Started 0 0
Template files are the building blocks of your WordPress site. They fit together like the pieces of a puzzle to generate the web pages on your site. Some templates (the header and footer template files for example) are used on all the web pages, while others are used only under specific conditions.
A traditional web page consists of two files:
The XHTML page to hold the structure and content of the page and
the CSS Style Sheet which holds the presentation styles of the page.
In WordPress, the (X)HTML structure and the CSS style sheet are present but the content is generated 8220;behind the scenes8221; by various template files. The template files and the style sheet are stored together as a WordPress Theme. To learn more about creating Themes, read Theme Development.
The WordPress Page Structure
A simple WordPress web page structure is made up of three basic building 8220;blocks8221;: a header, the content, and a footer. Each of these blocks is generated by a template file in your current WordPress Theme.
Header
Content
Footer
The header contains all the information that needs to be at the top 8211; i.e. inside the
tag 8211; of your XHTML web page, such as theThe content block contains the posts and pages of your blog, i.e. the 8220;meat8221; of your site.
The footer contains the information that goes at the bottom of your page, such as links to other Pages or categories on your site in a navigation menu, copyright and contact information, and other details.
Basic Template Files
To generate such a structure within a WordPress Theme, start with an index.php template file in your Theme s directory. This file has two main functions:
Include or 8220;call8221; the other template files
Include the WordPress Loop to gather information from the database (posts, pages, categories, etc.)
For our simple structure, we only need to include two other template files: the header and the footer. These must be named header.php and footer.php. The Template Tags that include them look like this:
In order to display the posts and pages of your blog (and to customize how they are being displayed), your index.php file should run the WordPress Loop between the header and footer calls.
More Complex Page Structure
Many WordPress themes include one or several sidebars that contains navigation features and more information about your website. The sidebar is generated by a template file called sidebar.php. It can be included in your index.php template file with the following template tag:
Where s the Beef?
Notice that we have not included a template tag to 8220;get8221; the content of our web page. That is because the content is generated in the WordPress Loop, inside index.php.
Also note that the Themes style sheet determines the look and placement of the header, footer, sidebar, and content in the user s browser screen. For more information on styling your WordPress Themes and web pages, see Blog Design and Layout.
Template Files Within Template Files
You have seen how WordPress includes standard template files (header, footer, and sidebar) within the index.php template file. You can also include other template files within any of your template files.
For example, sidebar.php might contain a template file that generates a search form 8211; searchform.php. Because this is not one of WordPress s standard template files, the code to include it is a little different:
We should no longer be using include and TEMPLATEPATH to get our search forms into themes as WordPress supplies the above template tag.
Header
Content
Comment Form
Sidebar
Search Form
Footer
Most WordPress Themes include a variety of template files within other templates to generate the web pages on the site. The following template files are typical for the main template (index.php) of a WordPress site:
header.php
theloop.php (The Content)
wp-comments.php
sidebar.php
searchform.php
footer.php
However, this structure can be changed. For instance, you could put the search form in your header. Perhaps your design does not need a footer, so you could leave that template out entirely.
Special Template Files
WordPress features two core page views of web pages in a WordPress site. The single post view is used when the web pages displays a single post. The multi-post view lists multiple posts or post summaries, and applies to category archives, date archives, author archives, and (usually) the 8220;normal8221; view of your blog s home page. You can use the index.php template file to generate all of these types of pages or rely on WordPress template hierarchy to choose different template files depending on the situation.
The WordPress Template Hierarchy answers the following question:
What template file will WordPress use when a certain type of page is displayed?
WordPress automatically recognizes template files with certain standard names and uses them for certain types of web pages. For example, when a user clicks on the title of a blog post, WordPress knows that they want to view just that article on its own web page. The WordPress template hierarchy will use the single.php template file rather than index.php to generate the page 8211; if your Theme has a single.php file. Similarly, if the user clicks on a link for a particular category, WordPress will use the category.php template if it exists; if it doesn t, it looks for archive.php, and if that template is also missing, WordPress will go ahead and use the main index.php template. You can even make special template files for specific categories (see Category Templates for more information).
June 2, 2011 WordPress Lessons 0 0
Introduction
WordPress Templates fit together like the pieces of a puzzle to generate the web pages on your WordPress site. Some templates (the header and footer template files for example) are used on all the web pages, while others are used only under specific conditions.
What this article is about
This article seeks to answer the following question:
Which template file(s) will WordPress use when it displays a certain type of page?
Who might find this useful
Since the introduction of Themes in WordPress 1.5, Templates have become more and more configurable. In order to develop WordPress themes, a proper understanding of the way WordPress selects template files to display the various pages on your blog is essential. If you seek to customize an existing WordPress theme, this article aims to help you decide which template file needs editing.
Using Conditional Tags
Using Conditional Tags
WordPress provides more than one way to match templates to query types. WordPress Theme developers can also use Conditional Tags to control which templates will be used to generate a certain page. Some WordPress Themes may not implement all of the template files described here. Some Themes use conditional tags to load other template files. See the Conditional Tags page and 8220;Query Based8221; in Theme Development for more information.
The Template File Hierarchy
The General Idea
First, WordPress matches every Query String to query types 8211; i.e. it decides what type of page (a search page, a category page, the home page etc.) is being requested.
Templates are then chosen 8211; and web page content is generated 8211; in the order suggested by the WordPress Template hierarchy, depending upon what templates are available in a particular WordPress Theme.
WordPress looks for template files with specific names in the current Theme s directory and uses the first matching template file listed under the appropriate query section below.
With the exception of the basic index.php template file, Theme developers can choose whether they want to implement a particular template file or not. If WordPress cannot find a template file with a matching name, it skips down to the next file name in the hierarchy. If WordPress cannot find any matching template file, index.php (the Theme s home page template file) will be used.
Examples
If your blog is at http://example.com/wp/ and a visitor clicks on a link to a category page like http://example.com/wp/category/your-cat/, WordPress looks for a template file in the current Themes directory that matches the categorys ID. If the categorys ID is 4, WordPress looks for a template file named category-4.php. If it is missing, WordPress next looks for a generic category template file, category.php. If this file does not exist either, WordPress looks for a generic archive template, archive.php. If it is missing as well, WordPress falls back on the main Theme template file, index.php.
If a visitor goes to your home page at http://example.com/wp/, WordPress first determines whether it has a static front page. If a static front page has been set, then WordPress loads that page according to the page template hierarchy. If a static front page has not been set, then WordPress looks for a template file called home.php and uses it to generate the requested page. If home.php is missing, WordPress looks for a file called index.php in the active themes directory, and uses that template to generate the page.
Visual Overview
The Template Hierarchy In Detail
The following sections describe the order in which template files are being called by WordPress for each query type.
Home Page display
- home.php
- index.php
Front Page display
- front-page.php – Used for both Your latest posts or A static page as set in the Front page displays section of Settings -> Reading
- Page display rules – When Front page is set in the Front page displays section of Settings -> Reading
- Home Page display rules – When Posts page is set in the Front page displays section of Settings -> Reading
Single Post display
- single-{post_type}.php 8211; If the post type were product, WordPress would look for single-product.php.
- single.php
- index.php
Page display
custom template 8211; Where custom template is the Page Template assigned to the Page.
page-{slug}.php 8211; If the page slug is recent-news, WordPress will look to use page-recent-news.php
page-{id}.php 8211; If the page ID is 6, WordPress will look to use page-6.php
page.php
index.php
Category display
category-{slug}.php 8211; If the categorys slug were news, WordPress would look for category-news.php
category-{id}.php 8211; If the categorys ID were 6, WordPress would look for category-6.php
category.php
archive.php
index.php
Tag display
tag-{slug}.php 8211; If the tags slug were sometag, WordPress would look for tag-sometag.php
tag-{id}.php 8211; If the tags ID were 6, WordPress would look for tag-6.php
tag.php
archive.php
index.php

