Pintsize header.php

header.php

Usually included in a wordpress template by a <?php get_header(); ?> command. This code creates the HTML code for the page header.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- php language_attributes(); displays the language attributes for the <html> tag. -->
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
        <!-- bloginfo is used to display the html type and charset -->
	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
        <!-- if this is the search page, show this line in the head --> 
	<?php if (is_search()) { ?>
	   <meta name="robots" content="noindex, nofollow" /> 
	<?php } ?>
        <!-- generate page title depending on page being displayed -->
	<title>
		   <?php
		      if (function_exists('is_tag') && is_tag()) {
		         single_tag_title("Tag Archive for &quot;"); echo '&quot; - '; }
		      elseif (is_archive()) {
		         wp_title(''); echo ' Archive - '; }
		      elseif (is_search()) {
		         echo 'Search for &quot;'.wp_specialchars($s).'&quot; - '; }
		      elseif (!(is_404()) && (is_single()) || (is_page())) {
		         wp_title(''); echo ' - '; }
		      elseif (is_404()) {
		         echo 'Not Found - '; }
		      if (is_home()) {
		         bloginfo('name'); echo ' - '; bloginfo('description'); }
		      else {
		          bloginfo('name'); }
		      if ($paged>1) {
		         echo ' - page '. $paged; }
		   ?>
	</title>
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <!-- bloginfo('stylesheet_url') generates a direct link to the style.css file -->
	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
        <!-- generate the pingback address -->
	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
        <!-- if singular page, then add javascripts to head -->
	<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
        <!-- wp_head: required action hook for the theme -->
	<?php wp_head(); ?>
</head>
<!-- body_class generates classes for the body statement -->
<body <?php body_class(); ?>>
<div id="page-wrap">
	<div id="header">
                <!-- echo: displays info from the attached function
                     get_option('home'): 
                     bloginfo('name'): displays the title of the blog
                     bloginfo('description'): displays the description of the blog -->  
		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
		<div class="description"><?php bloginfo('description'); ?></div>
	</div>
        <div id="topmenu">
           <!-- wp_nav_menu: displays a navigation menu created in the Appearance => Menus panel -->
           <?php wp_nav_menu( 
              array(
                  'container' => '',
                  'menu_id' => 'menu',
                  'theme_location' => 'primary-menu'  ) ); ?>
        </div>   
        <div class="clear"></div>

Next, footer.php

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s