Knowledge Sharing - Want to participate in the discussion?
4 May
AdCenter
o AdCenter refers to Microsoft’s Cost-Per-Click ad network. Due to its relative newness in the industry of online marketing, it only has a limited market share as compared to Google Adwords.
AdSense
o AdSense is Google’s contextual advertising network. Website owners can enroll in this ad serving program to allow text, image, and video advertisements administered by Google to be on their sites. Revenue is generated on a per-click or per-thousand impressions basis and publishers share the profits from those ad clicks with Google.
AdWords
o AdWords refers specifically to Google’s advertisement and link auction network. AdWords offers PPC advertising and site-targeted advertising for text and banner ads at the local, national, and international level.
Click
o A click generally refers to a search engine campaign, where a click would indicate that a user clicked on an ad or listing and was delivered to a website. Thus, a click on an ad results in a hit, or a visitor, to a web site.
Contextual Advertising
o Contextual Advertising is the term used to describe advertising programs that generate and display relevant advertisements on a site based on the specific content of that webpage. Google Adsense was the first contextual advertising program and remains the most popular one.
Conversion
o A conversion is a measure of a measurable goal being achieved on a web site. This will of course vary from site to site. It could be a sale transacted, a lead form filled out, or a phone call made to the company. A conversion is the most important metric, because it related directly to revenue generated for the business.
Cookie
o At the technical level, a cookie is a small data file (often URLs, Web addresses, etc.) created by a Web server and stored on a user’s computer. The purpose of cookies are to help websites customize a visitor’s experience, as well as allow affiliate program managers to track conversions.
CPA
o CPA stands for “Cost Per Action” and is defined as the cost to an advertiser for a specific action taken by a user in response to an ad. An “action” may be anything from an ad click to buying a product. It is a very useful way to measure the effectiveness of online advertising.
CPC
o CPC stands for “Cost Per Click”. It is the specific amount that an advertiser is charged each time their ad is clicked. Most search ads and contextual ads are sold in auctions where advertisers are charged on a Cost Per Click basis.
CPM
o CPM stands for “Cost Per Thousand Ad Impressions”. This refers to how much an advertiser pays for 1,000 impressions (page views) of its ad, regardless of the consumer’s subsequent actions. CPM is often used to measure how profitable a website is or will be.
CSS
o CSS or “Cascading Style Sheets” is the language used to describe how an HTML document should be formatted. Both web designers and users often use CSS to create style templates that specify how different text elements appear on a webpage.
CTR
o CTR is short for “Clickthrough Rate” and refers to the ratio of the number of clicks on an ad compared to the number of views. CTR is helpful in measuring an ad or link’s effectiveness, as well as the relevance of a particular traffic source or keyword. Generally, the higher the clickthrough rate the better. Search ads tend to have higher CTRs than traditional banners ads.
Dayparting
o Dayparting allows advertisers to adjust bids, or pause and resume campaigns based on the time-of-day or day-of-week. This strategy involves bidding more when your target audience is available and less when they are unlikely to be available.
Deep Link Ratio (DLR)
o A deep link is a link that points to an internal page within a website. Deep Link Ratio refers to the number of internal pages which are linked from other website’s most targeted relevant page to your most targeted relevant page.
Flash Content
o Flash content is the graphic animation used on websites to make them look rich and interactive. However, because flash contains minimal relevant content, search engines have more difficulty indexing and ranking websites that utilize flash content.
Learning center home
o Your guide to search engine marketing
Frames
o Frames is a feature supported by most Web browsers that allows website designers to display two or more pages (frames) in the same browser window. Although this web design technique facilitates consistent site navigation, frames have now been replaced by more effective content site building tools.
Google Dance
o “Google Dance” was the informal term used to describe Google’s monthly update of its search engine rankings. Now that Google has shifted to a constantly updating index, it no longer relies on this monthly procedure.
Hit
o A hit is a single view of a web page, web image or file.
Impression
o Used generally when referring to Pay-Per-Click campaigns, an impression refers to when your ad is shown on a search results page after being triggered by a user’s search query.
Landing Page
o A landing page is the webpage that a visitor arrives at after clicking on a link or advertisement. It is also referred to as a destination page, destination URL, or target URL.
Link Building
o Link building is the process of getting high quality websites to link to your website in order to increase link popularity and pagerank. Search engines consider websites with high quality inbound links to be more relevant, authoritative, and trustworthy, which helps boost their rankings in the search results.
Long Tail Keywords
o Long tail keywords are keyword phrases (normally composed of 3 to 4 keywords) that are more precise and specific, and therefore have a higher value. When long tail keywords are searched they are much more likely to convert to sales than more generic keywords.
One-Way Links
o One-way links are links to your site from sites that do not receive a link from your site. These are much more effective in increasing link popularity than reciprocal links because they show that other sites want to link to your site without receiving an inbound link in return.
Organic Rankings
o Also known as “natural” rankings, these are the search results that are supposed to be the most relevant results to the search query in question. Unlike PPC, you cannot control where you show up, and you do not pay each time a user clicks on the link. The rankings are based off of hundreds of factors, including the content on the site, the links from other sites to that site, the age of the site and much more. Also unlike the sponsored links, these rankings can take years to achieve, and the incumbent sites have a huge advantage over newcomers.
Overture
o Founded in 1997, Overture is the pioneer of search marketing and PPC advertising. In 2003 it was bought by Yahoo! and subsequently branded as Yahoo! Search Marketing (YSM).
Page View
o A page view is a single page being viewed a single time by a single IP address. Thus, one unique visitor resulting from one click could explore a website, visit ten pages and tally 10 page views.
PageRank
o PageRank is the index used by Google to rank websites on a scale of 0 to 10. This score is determined by Google using a complex logarithmic scale, based on a variety of factors including link popularity.
Pay Per Call
o Pay Per Call is similar to pay-per-click advertising, however, instead of clicking a sponsored link, pay-per-call ads display a toll-free telephone number that the person can call. The advertiser therefore receives a phone call instead of a visitor who clicks on their link and is then directed to their webpage.
Pay-per-click (PPC)
o Also known as “sponsored links” or “paid search”, these are the text ads on the top and down the right side of the search results pages of nearly every major search engine. Each time a web searcher clicks one of these links, the advertiser pays the search engines, from $.01 to $10 or more (the average is around $1-2 per click for positioning on the top of the page).
PPA (pay per action)
o Pay-Per-Action advertising is a new pricing model that enables advertisers to pay only when specific actions that they define are completed by a visitor on their site. For example, instead of paying for clicks or impressions, an advertiser may choose to pay only when a user makes a purchase or signs up for a newsletter.
Quality Score
o A quality score is a measure used by Google to assess the quality and relevance of your ads and determine your keyword status, minimum CPC bid, and ad rank. The score is determined by your keyword’s clickthrough rate and the relevance of your ad text, keyword, and landing page.
Query
o A query is the particular word, phrase, or group of words that a searcher enters into a search engine.
Reciprocal Links
o Reciprocal links are links to another website placed on your site in exchange for links to your site placed on their website. Quality reciprocal link exchanges can be an effective way to build link popularity and boost search engine rankings if done effectively, however, reciprocal links offers of low quality should be avoided.
Referrer
o A referrer is the source from which a particular website visitor came from.
ROAS
o ROAS stands for Return On Advertising Spending and represents the dollars earned per dollars spent on advertising. ROAS is computed by dividing revenue derived from the ad source by the cost of that ad source.
ROI
o ROI stands for Return On Investment and is a measure of how much return you will receive from each marketing dollar.
RSS
o RSS stands for Rich Site Summary or Real Simple Syndication. It is a method of sharing content among different websites. Sites can syndicate “feeds” (content) and users can use an application known as an RSS reader to download these feeds.
Search Engine Marketing (SEM)
o Search Engine Marketing is the broad term that encompasses all efforts with regard to achieving leads and sales from the search engines: PPC Management, SEO, landing page optimization generally all under the umbrella of Search Engine Marketing, though the phrase is used quite liberally and in a variety of contexts.
Search Engine Optimization (SEO)
o Search engine optimization is the process of increasing a web site’s organic rankings. The process is complex and time-consuming, and includes improving web site usability, content building, link building, social media and much more.
Search Engine Submission (SES)
o Search Engine Submission refers to the act of telling (”submitting”) the search engine that a website exists; it is basically a request for the search engine to visit, index and rank the site according to relevant keywords. Several years ago, with hundreds of search engines competing for market share, it was a valuable service on it’s own. More recently, Search Engine Submission is a very small - and many times unnecessary - part of a Search Engine Marketing effort.
SERP
o SERP stands for Search Engine Results Page and refers to the page on which the search engines display the results for a particular search query.
Site Map
o A site map is a visual model of the pages of a website. It is used to help search engines navigate through your website.
Unique Visitor
o A unique visitor is a count of the number of distinct IP addresses that have accessed a web page or web site in a period of time. So in a given month, a web site may have 1,000 visits, and 600 unique visitors, indicating that some of those 600 unique visitors visited the site more than once, totaling 1,000 visits total.
URL
o URL stands for Uniform Resource Locator and refers to the unique web address of any web page.
Viral Marketing
o Viral Marketing include self propagating marketing techniques. Common channels of transmission include email, blogging, and word of mouth.
Yahoo! Search Marketing
o Yahoo! Search Marketing (YSM) is a keyword-based PPC or “sponsored search” online advertising service provided by Yahoo!
4 May
What are Sitelinks ? They are a collection of links, automatically chosen by Google’s algorithm, to appear below the result of website, linking to main pages of your website. They are randomly chosen, although you can block any link from appearing. We will discuss more about Sitelinks in the Google Sitelinks FAQ section below.
Recently, some of my websites got Sitelinks whilst I tried different ways of reaching this milestone.
Some time ago, Vanessa Fox, from the Webmaster’s Central blog, wrote that the page from the Google Help describing these Sitelinks, has been updated to reflect “information on how Google generates these links”. That’s crap to say the least, because that Google Help page about Sitelinks, just states that they exist, are automatically generated and nothing more.
Although no official explanation except this very basic page is offered by Google, I will try and write down a few of my own ideas, about when and how to get these Sitelinks for your website. Whilst I can’t promise you guys that ALL of the procedures below are involved in the process of making Sitelinks appear for your website, I can definitely guarantee you that SOME are.
The above are true mainly because I have always (during months / years) tried 4 to 6 procedures at a time so I can’t really know which one had the most important contribution to the appearance of Sitelinks.
Whilst many other specialists and/or bloggers from the industry around the Internet have tried to help you figure out some ways to get Sitelinks, I will try to contradict them because some of those advices might not have a contribution to your effort, mainly because they are just too general and my experience says that they could be just loose-ends. Some of these advices might be:
Although I don’t want to contradict (I just did that, but well .. ) my fellow colleagues, the above are my personal opinions and I wanted to stress them out. The reason I didn’t named names is obvious.
And as the title of my post says, below you’ll get the FAQ section, where I tried to answer most, if not all the questions that poped up in the past year, from all kinds of readers or people:
Q: When are Sitelinks generated ? Is there some kind of Pagerank-alike update ?
A: I do want to stress out that about 4 of my websites got Sitelinks in exactly the same 1-2 day period, although the websites are very different one from another. One is 2 years old, another is 3,5. One has 1000 links, the other has 40.000 links. One is in the auto domain one is my blog. They are not linked in-between them. So all of this makes me think that there is some kind of general update of the Sitelinks, much like the updates for Pagerank, Inbound links or Google Images. Since QOT got their Sitelinks on exactly the same day (6th Feb.) as many of my other websites, I am positive that there is a general Sitelinks update.
Q: I can’t see any Sitelinks generated within my Sitemaps account, although they appear in Google!
A: Sitelinks take anywhere from 2 weeks to 1 month to appear within your Sitemaps account, after they first appeared in the SERPs. Then you will have better control over some of the links.
Q: Why doesn’t my very important “Clients” page get in the Sitelinks section ?
A: This may have to do with the fact that Sitelinks are usually generated from the first level links only. This means that if you have a page reachable by two clicks, it will never be included in the Sitelinks section. On rare occasions, deeplinks will be chosen, but I am not sure as to how these websites are chosen. Also make sure that you have pure HTML links. No Javascript or Flash.
Q: My website doesn’t have too much text links. Does this mean I’m doomed ?
A: Google will generate Sitelinks from image links too, as long as the image has the ALT tag. As other people have found too, it seems that the Sitelinks algorithm may chose a Sitelink even if you have no link towards it from your website, but in exchange, the page has a large number of links from other websites.
Q: What’s the point of having these stupid Sitelinks ?
A: One simple and huge reason: Trust and brand. Sitelinks have began to resemble trust lately in the eyes of the normal surfer (not to us SEMs, simply because we know there are heavily penalized websites who still got Sitelinks), so any website who has them is more prone to get clicks from the SERPs, from the search terms that show Sitelinks.
Q: What’s the minimum and maximum number of Sitelinks I’ll get ?
A: Minimum 2, maximum 8. Nevertheless I still can’t figure it out how Google assigns the number of Sitelinks to each website, except popularity. Most of my popular websites have 8. Most of my not-so-popular websites have 2 to 4.
Q: I don’t have a Google Sitemaps account. Will I still get Sitelinks ?
A: Definitely. The only drawback is that you will not have any control over them.
Q: How are the Sitelinks calculated ? Which links get in and which not ?
A: There are all kinds of opinions. After closely studying all my websites, I myself will still believe that they are chosen randomly. Not after traffic, not after inbound links. There’s an interesting thread at SEW which you might want to read to get some speculation.
Q: I have a page in the Sitelinks section that doesn’t exist anymore. What should I do ?
A: It appears that the crawl delay of the Sitelinks is at least one month. So if you have a page that doesn’t exist anymore, try to 301 redirect it to the new one. The Sitelinks will then work ok.
Q: In my Sitemaps account I can remove Sitelinks if I don’t like them ?
A: Indeed you can. But please be careful when you do that, because if you remove a Sitelink it will not get replaced by another. This means that if you had 6 Sitelinks, and you block one because it’s not appropiate, you will be left with 5 Sitelinks in the Google SERPs. The 6th one will not be replaced with a new Sitelinks.
The title is just a teaser for Vanessa. She’s had that Nude thing like forever :)
For you guys who don’t know Vanessa, she’s been the women who lead the Google Webmasters Central team until she moved to Zillow.
In this section I’ll analyze the post she made on her blog right after she left Google. I’m actually amazed to see how I can’t any reactions to this post, since IMHO it’s the most important post about Sitelinks ever. More important than what Google has released and certainly more important then I or my colleagues speculate, simply because she’s been involved in the process of releasing the Sitelinks. Block quotes are quotes from Vanessa’s post:
For instance, if I do a Google search for [duke’s chower house seattle], am I looking for directions? Hours? A menu? Google doesn’t know, so they offer up several suggestions. (Quality aside: a link to the menu shows up in the sitelinks, but if you do a search for [duke’s chowder house seattle menu], that same link doesn’t show up on the first page. In fact, no pages from the Duke’s site show up.)
Basically, what Vanessa is telling us is that Sitelinks will NEVER appear for specific search terms. So that’s why we get Sitelinks for “Computers” or “Cristian Mezei” or “HP” or generally, company names as well as very general industry terms.
Google autogenerates the list of sitelinks at least in part from internal links from the home page. You’ll notice in the Duke’s example that one of the sitelinks is “five great locations” which also appears as primary navigation on the Duke’s home page. If you want to influence the sitelinks that appear for your site, make sure that your home page includes the links you want and that those links are easy to crawl (in HTML rather than Flash or Javascript, for instance) and have short anchor text that’ll fit in a sitelinks listing. They’ll also have to be relevant links. You can’t just put your Buy Cheap Viagra now link on the home page of your elementary school site and hope for the best.
In the above, Vanessa confirms me what I already told you in the FAQ section above. Sitelinks will be chosen from links present in the homepage only. I still firmly believe that some websites have Sitelinks from deeplinks within the website. How and when these websites are chosen, is still a mystery.
One more important thing we learn is that Sitelinks are chosen from relevant links in the homepage. Instead of repeating what Vanessa said about relevance, read the above quote.
There is a lot of other useful information inside Vanessa’s post, but since I already tackled those points in my previous sections, I left them aside.
I asked a colleague of mine involved in SEM too, what he thinks about Sitemaps. I thought to put his answer here as well:
Cristian asked me about my opinion regarding Sitelinks. Breaking this question in small parts, here are my thoughts.
The sitelink option in the Google results are similar with the siteinfo.xml provided for the Alexa toolbar, a simple option for a webmaster to provide most important direct links to his website structure. Google version of Siteinfo is different because you cannot specify WHICH link in your website is a Sitelink. You can only ask remove one link from the Sitelinks (Google Webmaster panel option).
Why are the Sitelinks appearing, when and under which algorithm? The algorithm used is totally automated and is taking in consideration the following criteria’s:
from: seopedia.org/internet-marketing-and-seo/google-sitelinks-the-ultimate-faq/
Tags: age, ark, blogger, code, computer, count, download, engine, etc, Google, Google, IDE, image, Internet, Keyword, keywords, list, Nevertheless, option, page, PHP, proc, process, PROM, ranking, release, relevance, search, SEF, SEM, SEO, SEO, site rank, Sites, stable, traffic, XP3 May
Here is an example demonstrating the power of cURL. This code posts all the correct post fields to Googles universal Account Services login and brings the user directly to the AdSense Overview page. Cookies are used in this example as well as setting the USER AGENT and REFERRER HTTP headers.
Curl Google Analytics Login Code Example
source:www.askapache.com/webmaster/login-to-google-adsense-using-php.html
3 May
The following article is about developing or designing your own WordPress Theme. If you wish to learn more about how to install and use Themes, review the documentation regarding Using Themes. This topic differs from Using Themes because it discusses the technical aspects of writing code to build your own Themes rather than how to activate Themes or where to obtain new Themes.
You may wish to develop WordPress Themes for your own use or for distribution.
WordPress Themes are files and styles that work together to create a presentation or look for a WordPress site. Each Theme may be different, offering many choices for users to take advantage of in order to instantly change their website look. Why should you build your own WordPress Theme?
A WordPress Theme has many benefits, too.
Why should you build your own WordPress Theme? That’s the real question.
WordPress Themes live in subdirectories residing in wp-content/themes/. The Theme’s subdirectory holds all of the Theme’s style sheet files, template files, an optional functions file (functions.php), and images. For example, a Theme named “test” would probably reside in the directory wp-content/themes/test/.
WordPress includes two Themes in the download, a “Classic” and “Default” Theme. The two Themes are different and use different functions and tags to generate their web page results and looks. Examine the files carefully for these Themes to get a better idea of how to build your own Theme files.
WordPress Themes consist of three main types of files, in addition to images. One is the style sheet called style.css, which controls the presentation (look) of the web pages. The second is the optional functions file (functions.php). The other files are the template files which control the way the web page generates the information from the Database to be displayed as a web page. Let’s look at these individually.
In addition to CSS style information for your theme, the stylesheet, style.css must provide details about the Theme in the form of comments. No two Themes are allowed to have the same details listed in their comment headers, as this will lead to problems in the Theme selection dialog. If you make your own Theme by copying an existing one, make sure you change this information first.
The following is an example of the first few lines of the stylesheet, called the style sheet header, for the Theme “Rose”:
/* Theme Name: Rose Theme URI: the-theme's-homepage Description: a-brief-description Author: your-name Author URI: your-URI Template: use-this-to-define-a-parent-theme--optional Version: a-number--optional . General comments/License Statement if any. . */
The simplest Theme includes only a style.css file, plus images, if any. To create such a Theme, you must specify a set of templates to inherit for use with the Theme by editing the Template: line in the style.css header comments. For example, if you wanted the Theme “Rose” to inherit the templates from another Theme called “test”, you would include Template: test in the comments at the beginning of Rose’s style.css. Now “test” is the parent Theme for “Rose”, which still consists only of a style.css file and the concomitant images, all located in the directory wp-content/themes/Rose. (Note that specifying a parent Theme will inherit all of the template files from that Theme — meaning that any template files in the child Theme’s directory will be ignored.)
The comment header lines in style.css are required for WordPress to be able to identify a Theme and display it in the Administration Panel under Design > Themes as an available Theme option along with any other installed Themes.
Note : When defining the parent Theme, in the Template: section of the comment header, you must use the name of the directory of the style. For example, to use as parent template the Default Wordpress Theme, don’t write Template: WordPress Default, but Template: default, because default is the directory of this Theme.
A theme can optionally use a functions file, which resides in the theme subdirectory and is named functions.php. This file basically acts like a plugin, and if it is present in the theme you are using, it is automatically loaded during WordPress initialization (both for admin pages and external pages). Suggested uses for this file:
The “Default” WordPress theme contains a functions.php file that defines functions and an admin screen, so you might want to use it as a model. Since functions.php basically functions as a plugin, the Function_Reference list is the best place to go for more information on what you can do with this file.
Templates are PHP source files used to generate the pages requested by visitors. Let’s look at the various templates that can be defined as part of a Theme.
WordPress allows you to define separate templates for the various aspects of your weblog; however, it is not essential to have all these different template files for your blog to function fully. Templates are chosen and generated based upon the Template Hierarchy, depending upon what templates are available in a particular Theme. As a Theme developer, you can choose the amount of customization you want to implement using templates. For example, as an extreme case, you can use only one template file, called index.php as the template for all pages generated and displayed by the weblog. A more common use is to have different template files generate different results, to allow maximum customization.
At the very minimum, a WordPress Theme consists of two files:
Both of these files go into the Theme’s directory. The index.php template file is very flexible. It can be used to include all references to the header, sidebar, footer, content, categories, archives, search, error, and other web pages generated by the user on your site. Or it can be subdivided into modular template files, each one taking on part of the workload. If you do not provide any other template files, WordPress will use the built-in default files. For example, if you do not have either a comments.php or comments-popup.php template file, then WordPress will automatically use the wp-comments.php and wp-comments-popup.php template files using Template Hierarchy. These default templates may not match your Theme very well, so you probably will want to provide your own. The basic files normally used to subdivide (which go into the Theme’s directory) are:
Using these modular template files, you can put template tags within the index.php master file to include or get these units where you want them to appear in the final generated web page.
Here is an example of the include usage:
<?php get_sidebar(); ?> <?php get_footer(); ?>
For more on how these various Templates work and how to generate different information within them, read the Templates documentation.
WordPress can load different Templates for different query types. There are two ways to do this: as part of the built-in Template Hierarchy, and through the use of Conditional Tags within The Loop of a template file.
To use the Template Hierarchy, you basically need to provide special-purpose Template files, which will automatically be used to override index.php. For instance, if your Theme provides a template called category.php and a category is being queried, category.php will be loaded instead of index.php. If category.php is not present, index.php is used as usual.
You can get even more specific in the Template Hierarchy by providing a file called, for instance, category-6.php — this file will be used rather than category.php when generating the page for the category whose ID number is 6. (You can find category ID numbers in Manage > Categories if you are logged in as the site administrator). For a more detailed look at how this process works, see Category Templates.
If your Theme needs to have even more control over which Template files are used than what is provided in the Template Hierarchy, you can use Conditional Tags. The Conditional Tag basically checks to see if some particular condition is true, within the WordPress Loop, and then you can load a particular template, or put some particular text on the screen, based on that condition.
For example, to generate a distinctive style sheet in a post only found within a specific category, the code might look like this:
<?php if (is_category(9)) { // looking for category 9 posts include(TEMPLATEPATH . '/single2.php'); } else { // put this on every other category post include(TEMPLATEPATH . '/single1.php'); } ?>
Or, using a query, it might look like this:
<?php $post = $wp_query->post; if ( in_category('9') ) { include(TEMPLATEPATH . '/single2.php'); } else { include(TEMPLATEPATH . '/single1.php'); } ?>
In either case, this example code will cause different templates to be used depending on the category of the particular post being displayed. Query conditions are not limited to categories, however — see the Conditional Tags article to look at all the options.
This feature is currently broken in WordPress 2.5.
Wordpress uses media icons to represent attachment files on your blog and in the Admin interface, if those icons are available.
It looks for image files named by media type in the images directory of the current theme. (As of Wordpress 2.2, the default theme comes with only one media icon, audio.jpg.)
For example, for an attachment of MIME type audio/mpeg, Wordpress would look for an icon file at these locations, stopping after the first match (see wp_mime_type_icon):
Here is the list of Theme template files recognized by WordPress. Of course, your Theme can contain any other style sheets, images, or files. Just keep in mind that the following have special meaning to WordPress — see Template Hierarchy for more information.
These files have a special meaning with regard to WordPress because they are used as a replacement for index.php, when available, according to the Template Hierarchy, and when the corresponding Conditional Tag (a.k.a is_*(); function) returns true. For example, if only a single post is being displayed, the is_single() function returns ‘true’, and, if there is a single.php file in the active Theme, that template is used to generate the page.
The WordPress Default Theme (based on Michael Heilemann’s Kubrick layout for WordPress 1.2) provides a good example of how queries are mapped onto templates.
The code <?php bloginfo(’template_directory’); ?> inserts the URL of the template directory into the template output. You can append any additional URI information to this output to reference files in your Theme.
The code <?php bloginfo(’stylesheet_directory’); ?> inserts the URL of the directory that contains the current Theme stylesheet into the template output. You can append any additional URI information to this output to reference files for your Theme, specifically those that are used by the stylesheet.
The constant TEMPLATEPATH is a reference to the absolute path to the template directory for the current Theme (without the / at the end).
Note that URIs that are used in the stylesheet are relative to the stylesheet, not the page that references the stylesheet. This obviates the need to include PHP code in the CSS file to specify directories. For example, if you include an images/ directory in your Theme, you need only specify this relative directory in the CSS, like so:
h1 { background-image: URL(images/my_background.jpg); }
It is a good practice to use URIs in the manner described above to reference files from within a template, since, then your template will not depend on absolute paths.
It is possible to use the WordPress plugin system to define additional templates that are shown based on your own custom criteria. This advanced feature can be accomplished using the template_redirect action hook. More information about creating plugins can be found in the Plugin API reference.
When developing Themes, it’s good to keep in mind that your Theme should be set up so that it can work well with any WordPress plugins you (or another Theme user) might decide to install. Plugins add functionality to WordPress via “Action Hooks” (see Plugin API for more information). Most Action Hooks are within the core PHP code of WordPress, so your Theme does not have to have any special tags for them to work. But a few Action Hooks do need to be present in your Theme, in order for Plugins to display information directly in your header, footer, sidebar, or in the page body. Here is a