Introducing
Your new presentation assistant.
Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.
Trending searches
<?php
/**
* @package WordPress
* @subpackage Coraline
* @since Coraline 1.0
*/
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if (!IE)]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'coraline' ), max( $paged, $page ) );
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_head();
?>
</head>
<body <?php body_class(); ?>>
<div id="container" class="hfeed">
<?php do_action( 'before' ); ?>
<div id="header">
<div id="masthead" role="banner">
<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
<<?php echo $heading_tag; ?> id="site-title">
<span>
<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</span>
</<?php echo $heading_tag; ?>>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
</div><!-- #masthead -->
<div id="branding">
<?php
// Check to see if the header image has been removed
if ( get_header_image() != '' ) :
?>
<a href="<?php echo home_url( '/' ); ?>">
<?php
// The header image
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
$image[1] >= HEADER_IMAGE_WIDTH ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
else : ?>
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
<?php endif; // end check for featured image or standard header ?>
</a>
<?php endif; // end check for removed header image ?>
</div><!-- #branding -->
<div id="access" role="navigation">
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'coraline' ); ?>"><?php _e( 'Skip to content', 'coraline' ); ?></a></div>
<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
</div><!-- #access -->
</div><!-- #header -->
<div id="content-box">
<?php
/**
* @package WordPress
* @subpackage Coraline
* @since Coraline 1.0
*/
?>
<?php
/* If the current layout is a 3-column one with 2 sidebars on the right or left
* Coraline enables a "Feature Widget Area" that should span both sidebar columns
* and adds a containing div around the main sidebars for the content-sidebar-sidebar
* and sidebar-sidebar-layouts so the layout holds together with a short content area and long featured widget area
*/
$options = coraline_get_theme_options();
$current_layout = $options['theme_layout'];
$feature_widget_area_layouts = array( 'content-sidebar-sidebar', 'sidebar-sidebar-content' );
if ( in_array( $current_layout, $feature_widget_area_layouts ) ) :
?>
<div id="main-sidebars">
<?php if ( is_active_sidebar( 'feature-widget-area' ) ) : ?>
<div id="feature" class="widget-area" role="complementary">
<ul class="xoxo">
<?php dynamic_sidebar( 'feature-widget-area' ); ?>
</ul>
</div><!-- #feature.widget-area -->
<?php endif; // ends the check for the current layout that determines the availability of the feature widget area ?>
<?php endif; // ends the check for the current layout that determines the #main-sidebars markup ?>
<div id="primary" class="widget-area" role="complementary">
<?php do_action( 'before_sidebar' ); ?>
<ul class="xoxo">
<?php // The primary sidebar used in all layouts
if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>
<li id="search" class="widget-container widget_search">
<h3 class="widget-title"><?php _e( 'Search It!', 'coraline' ); ?></h3>
<?php get_search_form(); ?>
</li>
<li class="widget-container">
<h3 class="widget-title"><?php _e( 'Recent Entries', 'coraline' ); ?></h3>
<ul>
<?php
$recent_entries = new WP_Query();
$recent_entries->query( 'order=DESC&posts_per_page=10' );
while ($recent_entries->have_posts()) : $recent_entries->the_post();
?>
<li><a href="<?php the_permalink() ?>"><?php the_title() ?></a></li>
<?php
endwhile;
?>
</ul>
</li>
<li class="widget-container">
<h3 class="widget-title"><?php _e( 'Links', 'coraline' ); ?></h3>
<ul>
<?php wp_list_bookmarks( array( 'title_li' => '', 'categorize' => 0 ) ); ?>
</ul>
</li>
<?php endif; // end primary widget area ?>
</ul>
</div><!-- #primary .widget-area -->
<?php
/* If the current layout is a 3-column one, Coraline enables a second widget area called Secondary Widget Area
* This widget area will not appear for two-column layouts
*/
$secondary_widget_area_layouts = array( 'content-sidebar-sidebar', 'sidebar-sidebar-content', 'sidebar-content-sidebar' );
if ( in_array( $current_layout, $secondary_widget_area_layouts ) ) :
?>
<div id="secondary" class="widget-area" role="complementary">
<ul class="xoxo">
<?php // A second sidebar for widgets. Coraline uses the secondary widget area for three column layouts.
if ( ! dynamic_sidebar( 'secondary-widget-area' ) ) : ?>
<li class="widget-container widget_links">
<h3 class="widget-title"><?php _e( 'Meta', 'coraline' ); ?></h3>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</li>
<?php endif; ?>
</ul>
</div><!-- #secondary .widget-area -->
<?php endif; // ends the check for the current layout that determins if the third column is visible ?>
<?php
// add a containing div around the main sidebars for the content-sidebar-sidebar and sidebar-sidebar-layouts
// so the layout holds together with a short content area and long featured widget area
if ( in_array( $current_layout, $feature_widget_area_layouts ) )
echo '</div><!-- #main-sidebars -->';
?>
<?php
/**
* @package WordPress
* @subpackage Coraline
* @since Coraline 1.0
*/
get_header(); ?>
<div id="content-container">
<div id="content" role="main">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'coraline' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'coraline' ) . '</span>' ); ?></div>
</div><!-- #nav-above -->
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
<?php coraline_posted_on(); coraline_posted_by(); ?><span class="comments-link"><span class="meta-sep">|</span> <?php comments_popup_link( __( 'Leave a comment', 'coraline' ), __( '1 Comment', 'coraline' ), __( '% Comments', 'coraline' ) ); ?></span>
<?php edit_post_link( __( 'Edit', 'coraline' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'coraline' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<div class="entry-info">
<?php coraline_posted_in(); ?>
<?php edit_post_link( __( 'Edit', 'coraline' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-info -->
</div><!-- #post-## -->
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'coraline' ) . '</span> %title' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'coraline' ) . '</span>' ); ?></div>
</div><!-- #nav-below -->
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #content-container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php
/**
* @package WordPress
* @subpackage Coraline
* @since Coraline 1.0
*/
?>
</div><!-- #content-box -->
<div id="footer" role="contentinfo">
<?php get_sidebar( 'footer' ); ?>
<div id="colophon">
<?php printf( __( 'Theme: %1$s by %2$s', 'coraline' ), 'Coraline', '<a href="http://automattic.com/" rel="designer">Automattic</a>.' ); ?> <span class="generator-link"><a href="<?php echo esc_url( __( 'http://wordpress.org/', 'coraline' ) ); ?>" title="<?php esc_attr_e( 'A Semantic Personal Publishing Platform', 'coraline' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s.', 'coraline' ), 'WordPress' ); ?></a></span>
</div><!-- #colophon -->
</div><!-- #footer -->
</div><!-- #container -->
<?php wp_footer(); ?>
</body>
</html>
Now let's see it in action!