Skip to content

Instantly share code, notes, and snippets.

@chipbennett
Created June 2, 2012 00:27
Show Gist options
  • Save chipbennett/2855912 to your computer and use it in GitHub Desktop.
Save chipbennett/2855912 to your computer and use it in GitHub Desktop.
header.php before
<!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">
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
<!-- Meta -->
<meta charset="<?php bloginfo('charset'); ?>" />
<meta name="Generator" content="WordPress" />
<meta name="Description" content="<?php bloginfo('description'); ?>" />
<meta name="Keywords" content="<?php bloginfo('description'); ?> , wordpress , minimalist , webdesign , w3c , brasilia, wordpress brasilia, wordpress warsaw , warsaw, poland, web master" />
<meta name="Robots" content="ALL" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="Gabriel Del fiaco - www.gabrieldelfiaco.com" />
<meta name="Resource-Type" content="Document" />
<title><?php
if (is_home()) {
bloginfo('name');
} elseif (is_404()) {
echo '404 Not Found'; echo ' | '; bloginfo('name');
} elseif (is_category()) {
echo 'Category:'; wp_title(''); echo ' | '; bloginfo('name');
} elseif (is_search()) {
echo 'Search Results'; echo ' | '; bloginfo('name');
} elseif ( is_day() || is_month() || is_year() ) {
echo 'Archives:'; wp_title(''); echo ' | '; bloginfo('name');
} else {
echo wp_title(''); echo ' | '; bloginfo('name');
}
?>
</title>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>" type="text/css" media="all" />
<link href="<?php echo bloginfo('template_url'); ?>/library/js/swfupload/default.css" rel="stylesheet" type="text/css" />
<link href="<?php bloginfo('template_directory'); ?>/library/css/slimbox.css" rel="stylesheet" type="text/css" />
<!--[if lt IE7]>
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri() . '/library/css/ie6.css'; ?>" />
<![endif]-->
<!--[if lt IE8]>
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri() . '/library/css/ie7.css'; ?>" />
<![endif]-->
<!--[if lte IE9]>
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri() . '/library/css/ie8.css'; ?>" />
<![endif]-->
<script src="<?php bloginfo('template_directory'); ?>/library/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/library/js/jquery.nivo.slider.pack.js" type="text/javascript"></script>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS 2.0 Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<?php
if ( comments_open() && is_singular() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
?>
<?php wp_head(); ?>
</head>
<?php
$bodyclass = '';
// Generic semantic classes for what type of content is displayed
if ( is_front_page() ) {
$bodyclass = 'home';
} else if { is_home() ) {
$bodyclass = 'blog';
} else if { is_archive() ) {
$bodyclass = 'archive';
} else if { is_date() ) {
$bodyclass = 'date';
} else if { is_search() ) {
$bodyclass = 'search';
} else if { is_paged() ) {
$bodyclass = 'paged';
} else if { is_attachment() ) {
$bodyclass = 'attachment';
} else if { is_404() ) {
$bodyclass = 'four04';
} else if { is_tax() ) {
$bodyclass = 'taxonomy';
} else if { is_sticky() ) {
$bodyclass = 'sticky';
}
?>
<body <?php body_class( $bodyclass ); ?>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment