header.php
Description: The default header.
This template includes the following templates:
- N/A.
Template Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes() ?>>
<head profile="http://gmpg.org/xfn/11">
<title><?php bloginfo('name'); if ( is_404() ) : _e(' » ', 'sandbox'); _e('Not Found', 'sandbox'); elseif ( is_home() ) : _e(' » ', 'sandbox'); bloginfo('description'); else : wp_title(); endif; ?></title>
<meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
<meta name="description" content="<?php bloginfo('description') ?>" />
<meta name="generator" content="WordPress <?php bloginfo('version') ?>" /><!-- Please leave for stats -->
<link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" />
<link rel="alternate" type="application/rss+xml" href="<?php bloginfo('rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Posts RSS feed', 'sandbox'); ?>" />
<link rel="alternate" type="application/rss+xml" href="<?php bloginfo('comments_rss2_url') ?>" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?> <?php _e('Comments RSS feed', 'sandbox'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url') ?>" />
<?php wp_head() ?>
</head>
<body class="<?php sandbox_body_class() ?>">
<div id="wrapper" class="hfeed">
<div id="header">
<h1 id="blog-title"><a href="<?php echo get_option('home') ?>/" title="<?php bloginfo('name') ?>" rel="home"><?php bloginfo('name') ?></a></h1>
<div id="blog-description"><?php bloginfo('description') ?></div>
</div><!-- #header -->
<div id="access">
<div class="skip-link"><a href="#content" title="<?php _e('Skip navigation to the content', 'sandbox'); ?>"><?php _e('Skip to content', 'sandbox'); ?></a></div>
<?php sandbox_globalnav() ?>
</div><!-- #access -->
This template includes the following tags:
_e()is a WordPress function used to mark a string for translation to another language. It is similar to__(), except that__()returns the string while_e()echoes it.bloginfo()is a WordPress function that displays information about your blog. Using various parameters, the function can display the following strings:- Blog title;
- Blog tagline;
- Administrator's email address;
- Document content-type;
- Document charset;
- WordPress version;
- Blog URL;
- Pingback URL;
- URL of the RSS 0.92, RSS 1.0, RSS 2.0, or Atom feed;
- URL of the comments feed;
- URL of the directory in which WordPress is installed;
- URL of the current template's directory;
- URL of the current
style.cssfile; - URL of the stylesheet directory (deprecated)
get_bloginfo()is a WordPress tag which returns information about your blog.get_option()is a WordPress tag used to get a named option from the options database table. See the Option Reference for a list of valid parameters.is_404()is a conditional tag which returns true if an HTTP 404 error has occured.is_home()is a conditional tag which returns true on the main blog page.language_attributes()sandbox_body_class()is a Sandbox-specific function which adds semantic classes to thebodyelement.sandbox_globalnav()is a Sandbox-specific function.wp_head()is a WordPress hook that is necessary for the functioning of some plugins.wp_specialchars()is a WordPress function that is "like the PHP function htmlspecialchars except it doesn't double-encode HTML entities." (Function Reference)wp_title()is a WordPress tag that displays or returns the title of the page, preceded by a separator string.
HTML Skeleton
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <head profile="http://gmpg.org/xfn/11"> <title>[TITLE]</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="description" content="[TAGLINE]" /> <meta name="generator" content="WordPress 2.3.1" /> <!-- Please leave for stats --> <link rel="stylesheet" type="text/css" /> <link rel="alternate" type="application/rss+xml" /> <link rel="alternate" type="application/rss+xml" /> <link rel="pingback" /> <meta name='robots' content='noindex,nofollow' /> <link rel="EditURI" type="application/rsd+xml" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" /> </head> <body class="wordpress y[YEAR] m[MONTH] d[DAY] h[HOUR] home loggedin"> <div id="wrapper" class="hfeed"> <div id="header"> <h1 id="blog-title"><a rel="home">[BLOG TITLE]</a></h1> <div id="blog-description">[TAGLINE]</div> </div> <!-- #header --> <div id="access"> <div class="skip-link"> <a href="#content" title="Skip navigation to the content">Skip to content</a> </div> <div id="menu"> <ul> <li class="page_item page-item-[#]">[LINK] </ul> </div> </div> <!-- #access -->
Related CSS Styles
Resources
- N/A