yoko

YOKO
index.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if (  $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-below">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'yoko' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?></div>
</nav><!-- end nav-below -->
<?php endif; ?>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
header.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
bloginfo( 'name' );
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', 'yoko' ), max( $paged, $page ) );
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="clearfix">
<header id="branding">
<nav id="mainnav" class="clearfix">
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- end mainnav -->
<?php global $yoko_options;
$yoko_settings = get_option( 'yoko_options', $yoko_options ); ?>

<hgroup id="site-title">
<?php if( $yoko_settings['custom_logo'] ) : ?>
<img src="<?php echo $yoko_settings['custom_logo']; ?>" alt="<?php bloginfo('name'); ?>" />
<?php else : ?>
<h1><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php endif; ?>
</hgroup><!-- end site-title -->
        
        <?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() &&
current_theme_supports( 'post-thumbnails' ) &&
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 , array(1102,350), array('class' => 'headerimage'));
elseif ( get_header_image() ) : ?>
<img src="<?php header_image(); ?>" class="headerimage" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" /><!-- end headerimage -->
<?php endif; ?>
<div class="clear"></div>

<nav id="subnav">
<?php
if (is_nav_menu( 'Sub Menu' ) ) {
wp_nav_menu( array('menu' => 'Sub Menu' ));} ?>
</nav><!-- end subnav -->
</header><!-- end header -->
page.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<?php the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
sidebar.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<div id="secondary" class="widget-area" role="complementary">
<?php if ( ! dynamic_sidebar( 'sidebar-1' ) ) : ?>

<aside id="categories" class="widget widget_categories">
<ul>
<?php wp_list_categories('title_li=<h3 class="widget-title">' . __('Categories', 'yoko') . '</h3>' ); ?>
</ul>
</aside>

<aside id="archives" class="widget widget_archive">
<h3 class="widget-title"><?php _e( 'Archives', 'yoko' ); ?></h3>
<ul>
<?php wp_get_archives( 'type=monthly' ); ?>
</ul>
</aside>
<?php endif; // end sidebar 1 widget area ?>
</div><!-- #secondary .widget-area -->
</div><!-- end main -->
<div id="tertiary" class="widget-area" role="complementary">
<?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>

<aside id="search" class="widget widget_search">
<?php get_search_form(); ?>
</aside>
<aside id="recent-posts" class="widget widget_recent_entries">
<h3 class="widget-title"><?php _e( 'Recent Posts', 'yoko' ); ?></h3>
<ul>
<?php wp_get_archives('type=postbypost&limit=7'); ?>
</ul>
</aside>

<aside id="calendar" class="widget widget_calendar">
<h3 class="widget-title"><?php _e( 'Calendar', 'yoko' ); ?></h3>
<?php get_calendar(true); ?>
</aside>

<aside id="calendar" class="widget widget_links">
<h3 class="widget-title"><?php _e( 'Links', 'yoko' ); ?></h3>
<ul class="blogroll">
<?php wp_list_bookmarks('title_li=&categorize=0'); ?>
</ul>
</aside>
<?php endif; // end sidebar 2 widget area ?>
</div><!-- end tertiary .widget-area -->
comments.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<div id="comments"  class="clearfix">
<?php if ( post_password_required() ) : ?>
<div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'yoko' ); ?></div>
</div><!-- end comments -->
<?php
/* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
*/
return;
endif;
?>
<?php
// You can start editing here -- including this comment!
?>
<?php if ( have_comments() ) : ?>
<h3 id="comments-title"><?php
printf( _n( 'One Comment', '%1$s Comments', get_comments_number(), 'yoko' ),
number_format_i18n( get_comments_number() ));
?></h3>
<p class="write-comment-link"><a href="#respond"><?php _e( 'Leave a reply &rarr;', 'yoko' ); ?></a></p>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above">
<h1 class="section-heading"><?php _e( 'Comment navigation', 'yoko' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'yoko' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'yoko' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>

<ol class="commentlist">
<?php wp_list_comments( array( 'callback' => 'yoko_comment' ) ); ?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below">
<h1 class="section-heading"><?php _e( 'Comment navigation', 'yoko' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'yoko' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'yoko' ) ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>

<?php else : // this is displayed if there are no comments so far ?>

<?php if ( comments_open() ) : // If comments are open, but there are no comments ?>

<?php else : // or, if we don't have comments:

/* If there are no comments and comments are closed,
* let's leave a little note, shall we?
* But only on posts! We don't want the note on pages.
*/
if ( ! comments_open() && ! is_page() ) :
?>
<p class="nocomments"><?php _e( 'Comments are closed.', 'yoko' ); ?></p>
<?php endif; // end ! comments_open() && ! is_page() ?>
<?php endif; ?>

<?php endif; ?>
<?php comment_form(
array(
'comment_notes_before' =>__( '<p class="comment-notes">Required fields are marked <span class="required">*</span>.</p>', 'yoko'),
'comment_notes_after' => '',
'comment_field'  => '<p class="comment-form-comment"><label for="comment">' . _x( 'Message <span class="required">*</span>', 'noun', 'yoko' ) . '</label><br/><textarea id="comment" name="comment" rows="8"></textarea></p>',
)
); ?>
</div><!-- end comments -->
functions.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
/**
 * Make theme available for translation
 * Translations can be filed in the /languages/ directory
 */
load_theme_textdomain( 'yoko', TEMPLATEPATH . '/languages' );
$locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable( $locale_file ) )
require_once( $locale_file );
/**
 * Set the content width based on the theme's design and stylesheet.
 */
if ( ! isset( $content_width ) )
$content_width = 620;
/**
 * Tell WordPress to run yoko() when the 'after_setup_theme' hook is run.
 */
add_action( 'after_setup_theme', 'yoko' );
if ( ! function_exists( 'yoko' ) ):
/**
 * Create Yoko Theme Options Page
 */
require_once ( get_template_directory() . '/includes/theme-options.php' );
/**
 * Sets up theme defaults and registers support for WordPress features. 
 */
function yoko() {
// This theme styles the visual editor with editor-style.css to match the theme style.
add_editor_style();
// This theme uses post thumbnails
add_theme_support( 'post-thumbnails' );
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => __( 'Primary Navigation', 'yoko' ),
) );

// Add support for Post Formats
add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'video', 'image', 'quote' ) );
// This theme allows users to set a custom background
add_custom_background();
// Your changeable header business starts here
define( 'HEADER_TEXTCOLOR', '' );
// No CSS, just IMG call. The %s is a placeholder for the theme template directory URI.
define( 'HEADER_IMAGE', '%s/images/headers/ginko.jpg' );
// The height and width of your custom header. You can hook into the theme's own filters to change these values.
// Add a filter to yoko_header_image_width and yoko_header_image_height to change these values.
define( 'HEADER_IMAGE_WIDTH', apply_filters( 'yoko_header_image_width', 1102 ) );
define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'yoko_header_image_height', 350 ) );
// We'll be using post thumbnails for custom header images on posts and pages.
// We want them to be 940 pixels wide by 350 pixels tall.
// Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
// Don't support text inside the header image.
define( 'NO_HEADER_TEXT', true );
// Add a way for the custom header to be styled in the admin panel that controls
// custom headers. See yoko_admin_header_style(), below.
add_custom_image_header( '', 'yoko_admin_header_style' );
// ... and thus ends the changeable header business.
// Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
register_default_headers( array(
'ginko' => array(
'url' => '%s/images/headers/ginko.jpg',
'thumbnail_url' => '%s/images/headers/ginko-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Ginko', 'yoko' )
),
'flowers' => array(
'url' => '%s/images/headers/flowers.jpg',
'thumbnail_url' => '%s/images/headers/flowers-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Flowers', 'yoko' )
),
'plant' => array(
'url' => '%s/images/headers/plant.jpg',
'thumbnail_url' => '%s/images/headers/plant-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Plant', 'yoko' )
),
'sailing' => array(
'url' => '%s/images/headers/sailing.jpg',
'thumbnail_url' => '%s/images/headers/sailing-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Sailing', 'yoko' )
),
'cape' => array(
'url' => '%s/images/headers/cape.jpg',
'thumbnail_url' => '%s/images/headers/cape-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Cape', 'yoko' )
),
'seagull' => array(
'url' => '%s/images/headers/seagull.jpg',
'thumbnail_url' => '%s/images/headers/seagull-thumbnail.jpg',
/* translators: header image description */
'description' => __( 'Seagull', 'yoko' )
)
) );
}
endif;
if ( ! function_exists( 'yoko_admin_header_style' ) ) :
/**
 * Styles the header image displayed on the Appearance > Header admin panel.
 * Referenced via add_custom_image_header() in yoko_setup().
 */
function yoko_admin_header_style() {
?>
<style type="text/css">
/* Shows the same border as on front end */
#heading {
border-bottom: 1px solid #000;
border-top: 4px solid #000;
}
/* If NO_HEADER_TEXT is false, you would style the text with these selectors:
#headimg #name { }
#headimg #desc { }
*/
</style>
<?php
}
endif;
/**
 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
 */
function yoko_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'yoko_page_menu_args' );
/**
 * Sets the post excerpt length to 40 characters.
 */
function yoko_excerpt_length( $length ) {
return 40;
}
add_filter( 'excerpt_length', 'yoko_excerpt_length' );
/**
 * Returns a "Continue Reading" link for excerpts
 */
function yoko_continue_reading_link() {
return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'yoko' ) . '</a>';
}
/**
 * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and yoko_continue_reading_link().
 *
 * To override this in a child theme, remove the filter and add your own
 * function tied to the excerpt_more filter hook.
 */
function yoko_auto_excerpt_more( $more ) {
return ' &hellip;' . yoko_continue_reading_link();
}
add_filter( 'excerpt_more', 'yoko_auto_excerpt_more' );
/**
 * Adds a pretty "Continue Reading" link to custom post excerpts.
 *
 * To override this link in a child theme, remove the filter and add your own
 * function tied to the get_the_excerpt filter hook.
 */
function yoko_custom_excerpt_more( $output ) {
if ( has_excerpt() && ! is_attachment() ) {
$output .= yoko_continue_reading_link();
}
return $output;
}
add_filter( 'get_the_excerpt', 'yoko_custom_excerpt_more' );
/**
 * Remove inline styles printed when the gallery shortcode is used.
 */
function yoko_remove_gallery_css( $css ) {
return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
}
add_filter( 'gallery_style', 'yoko_remove_gallery_css' );
if ( ! function_exists( 'yoko_comment' ) ) :
/**
 * Template for comments and pingbacks. 
 */
function yoko_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>">
<div class="comment-gravatar"><?php echo get_avatar( $comment, 65 ); ?></div>

<div class="comment-body">
<div class="comment-meta commentmetadata"> 
<?php printf( __( '%s', 'yoko' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?><br/>
<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
<?php
/* translators: 1: date, 2: time */
printf( __( '%1$s at %2$s', 'yoko' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( 'Edit &rarr;', 'yoko' ), ' ' );
?>
</div><!-- .comment-meta .commentmetadata -->
<?php comment_text(); ?>

<?php if ( $comment->comment_approved == '0' ) : ?>
<p class="moderation"><?php _e( 'Your comment is awaiting moderation.', 'yoko' ); ?></p>
<?php endif; ?>
<div class="reply">
<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</div><!-- .reply -->

</div>
<!--comment Body-->

</div><!-- #comment-##  -->
<?php
break;
case 'pingback'  :
case 'trackback' :
?>
<li class="post pingback">
<p><?php _e( 'Pingback:', 'yoko' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'yoko'), ' ' ); ?></p>
<?php
break;
endswitch;
}
endif;
/**
 * Register widgetized area and update sidebar with default widgets
 */
function yoko_widgets_init() {
register_sidebar( array (
'name' => __( 'Sidebar 1', 'yoko' ),
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</aside>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array (
'name' => __( 'Sidebar 2', 'yoko' ),
'id' => 'sidebar-2',
'description' => __( 'An second sidebar area', 'yoko' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</aside>",
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}
add_action( 'init', 'yoko_widgets_init' );
/**
 * Removes the default styles that are packaged with the Recent Comments widget.
 */
function yoko_remove_recent_comments_style() {
global $wp_widget_factory;
remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
}
add_action( 'widgets_init', 'yoko_remove_recent_comments_style' );


/**
 * Calls SmoothScroll in Footer
 */
function yoko_smoothscroll_init() {
    if ( !is_admin() ) {
        wp_enqueue_script( 'jquery' );
        wp_enqueue_script( 'smoothscroll', get_template_directory_uri() . '/js/smoothscroll.js', array( 'jquery'), '1.0', true ); 
    }
}
// works also for WP < version 3.0
global $wp_version;
if ( version_compare($wp_version, "3.0alpha", "<") ) {
    add_action( 'init', 'yoko_smoothscroll_init' );
} else {
    add_action( 'after_setup_theme', 'yoko_smoothscroll_init' );
}
/**
 * Search form custom styling
 */
function yoko_search_form( $form ) {
    $form = '<form role="search" method="get" class="searchform" action="'.get_bloginfo('url').'" >
    <div><label class="screen-reader-text" for="s">' . __('') . '</label>
    <input type="text" class="search-input" value="' . get_search_query() . '" name="s" id="s" />
    <input type="submit" class="searchsubmit" value="'. esc_attr__('Search', 'yoko') .'" />
    </div>
    </form>';
    return $form;
}
add_filter( 'get_search_form', 'yoko_search_form' );
/**
 * Remove the default CSS style from the WP image gallery
 */
add_filter('gallery_style', create_function('$a', 'return "
<div class=\'gallery\'>";'));


/** 
 * Yoko Shortcodes
 */
 
// Enable shortcodes in widget areas
add_filter( 'widget_text', 'do_shortcode' );


// Columns Shortcodes
// Don't forget to add _last behind the shortcode if it is the last column.
// Two Columns
function yoko_shortcode_two_columns_one( $atts, $content = null ) {
   return '<div class="two-columns-one">' . $content . '</div>';
}
add_shortcode( 'two_columns_one', 'yoko_shortcode_two_columns_one' );
function yoko_shortcode_two_columns_one_last( $atts, $content = null ) {
   return '<div class="two-columns-one last">' . $content . '</div>';
}
add_shortcode( 'two_columns_one_last', 'yoko_shortcode_two_columns_one_last' );
// Three Columns
function yoko_shortcode_three_columns_one($atts, $content = null) {
   return '<div class="three-columns-one">' . $content . '</div>';
}
add_shortcode( 'three_columns_one', 'yoko_shortcode_three_columns_one' );
function yoko_shortcode_three_columns_one_last($atts, $content = null) {
   return '<div class="three-columns-one last">' . $content . '</div>';
}
add_shortcode( 'three_columns_one_last', 'yoko_shortcode_three_columns_one_last' );
function yoko_shortcode_three_columns_two($atts, $content = null) {
   return '<div class="three-columns-two">' . $content . '</div>';
}
add_shortcode( 'three_columns_two', 'yoko_shortcode_three_columns' );
function yoko_shortcode_three_columns_two_last($atts, $content = null) {
   return '<div class="three-columns-two last">' . $content . '</div>';
}
add_shortcode( 'three_columns_two_last', 'yoko_shortcode_three_columns_two_last' );
// Four Columns
function yoko_shortcode_four_columns_one($atts, $content = null) {
   return '<div class="four-columns-one">' . $content . '</div>';
}
add_shortcode( 'four_columns_one', 'yoko_shortcode_four_columns_one' );
function yoko_shortcode_four_columns_one_last($atts, $content = null) {
   return '<div class="four-columns-one last">' . $content . '</div>';
}
add_shortcode( 'four_columns_one_last', 'yoko_shortcode_four_columns_one_last' );
function yoko_shortcode_four_columns_two($atts, $content = null) {
   return '<div class="four-columns-two">' . $content . '</div>';
}
add_shortcode( 'four_columns_two', 'yoko_shortcode_four_columns_two' );
function yoko_shortcode_four_columns_two_last($atts, $content = null) {
   return '<div class="four-columns-two last">' . $content . '</div>';
}
add_shortcode( 'four_columns_two_last', 'yoko_shortcode_four_columns_two_last' );
function yoko_shortcode_four_columns_three($atts, $content = null) {
   return '<div class="four-columns-three">' . $content . '</div>';
}
add_shortcode( 'four_columns_three', 'yoko_shortcode_four_columns_three' );
function yoko_shortcode_four_columns_three_last($atts, $content = null) {
   return '<div class="four-columns-three last">' . $content . '</div>';
}
add_shortcode( 'four_columns_three_last', 'yoko_shortcode_four_columns_three_last' );
// Divide Text Shortcode
function yoko_shortcode_divider($atts, $content = null) {
   return '<div class="divider"></div>';
}
add_shortcode( 'divider', 'yoko_shortcode_divider' );
//Text Highlight and Info Boxes Shortcodes
function yoko_shortcode_highlight($atts, $content = null) {
   return '<span class="highlight">' . $content . '</span>';
}
add_shortcode( 'highlight', 'yoko_shortcode_highlight' );
function yoko_shortcode_yellow_box($atts, $content = null) {
   return '<div class="yellow-box">' . $content . '</div>';
}
add_shortcode( 'yellow_box', 'yoko_shortcode_yellow_box' );
function yoko_shortcode_red_box($atts, $content = null) {
   return '<div class="red-box">' . $content . '</div>';
}
add_shortcode( 'red_box', 'yoko_shortcode_red_box' );
function yoko_shortcode_green_box($atts, $content = null) {
   return '<div class="green-box">' . $content . '</div>';
}
add_shortcode( 'green_box', 'yoko_shortcode_green_box' );
/** 
 * Custom Social Links Widget
 */
class Yoko_SocialLinks_Widget extends WP_Widget {
function Yoko_SocialLinks_Widget() {
$widget_ops = array(
'classname' => 'widget_social_links', 
'description' => __('Link to your social profiles like twitter, facebook or flickr.', 'yoko'));
$this->WP_Widget('social_links', 'Yoko Social Links', $widget_ops);
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
echo $before_widget;
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);

$rss_title = empty($instance['rss_title']) ? ' ' : apply_filters('widget_rss_title', $instance['rss_title']);
$rss_url = empty($instance['rss_url']) ? ' ' : apply_filters('widget_rss_url', $instance['rss_url']);
$twitter_title = empty($instance['twitter_title']) ? ' ' : apply_filters('widget_twitter_title', $instance['twitter_title']);
$twitter_url = empty($instance['twitter_url']) ? ' ' : apply_filters('widget_twitter_url', $instance['twitter_url']);
$fb_title = empty($instance['fb_title']) ? ' ' : apply_filters('widget_fb_title', $instance['fb_title']);
$fb_url = empty($instance['fb_url']) ? ' ' : apply_filters('widget_fb_url', $instance['fb_url']);
$flickr_title = empty($instance['flickr_title']) ? ' ' : apply_filters('widget_flickr_title', $instance['flickr_title']);
$flickr_url = empty($instance['flickr_url']) ? ' ' : apply_filters('widget_flickr_url', $instance['flickr_url']);
$vimeo_title = empty($instance['vimeo_title']) ? ' ' : apply_filters('widget_vimeo_title', $instance['vimeo_title']);
$vimeo_url = empty($instance['vimeo_url']) ? ' ' : apply_filters('widget_vimeo_url', $instance['vimeo_url']);
$linkedin_title = empty($instance['linkedin_title']) ? ' ' : apply_filters('widget_linkedin_title', $instance['linkedin_title']);
$linkedin_url = empty($instance['linkedin_url']) ? ' ' : apply_filters('widget_linkedin_url', $instance['linkedin_url']);
$delicious_title = empty($instance['delicious_title']) ? ' ' : apply_filters('widget_delicious_title', $instance['delicious_title']);
$delicious_url = empty($instance['delicious_url']) ? ' ' : apply_filters('widget_delicious_url', $instance['delicious_url']);

if ( !empty( $title ) ) { echo $before_title . $title . $after_title; };
echo '<ul>';
if($rss_title == ' ') { echo ''; } else {  echo  '<li class="widget_sociallinks"><a href="'. $rss_url .'" class="rss">'. $rss_title .'</a></li>'; }
if($twitter_title == ' ') { echo ''; } else {  echo  '<li class="widget_sociallinks"><a href="'. $twitter_url .'" class="twitter">'. $twitter_title .'</a></li>'; }
if($fb_title == ' ') { echo ''; } else {  echo  '<li class="widget_sociallinks"><a href="'. $fb_url .'" class="facebook">'. $fb_title .'</a></li>'; }
if($flickr_title == ' ') { echo ''; } else {  echo  '<li class="widget_sociallinks"><a href="'. $flickr_url .'" class="flickr">'. $flickr_title .'</a></li>'; }
if($vimeo_title == ' ') { echo ''; } else {  echo  '  <li class="widget_sociallinks"><a href="'. $vimeo_url .'" class="vimeo">'. $vimeo_title .'</a></li>'; }
if($linkedin_title == ' ') { echo ''; } else {  echo  '<li class="widget_sociallinks"><a href="'. $linkedin_url .'" class="linkedin">'. $linkedin_title .'</a></li>'; }
if($delicious_title == ' ') { echo ''; } else {  echo  '<li class="widget_sociallinks"><a href="'. $delicious_url .'" class="delicious">'. $delicious_title .'</a></li>'; }
echo '</ul>';
echo $after_widget;

}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = strip_tags($new_instance['title']);

$instance['rss_title'] = strip_tags($new_instance['rss_title']);
$instance['rss_url'] = strip_tags($new_instance['rss_url']);
$instance['twitter_title'] = strip_tags($new_instance['twitter_title']);
$instance['twitter_url'] = strip_tags($new_instance['twitter_url']);
$instance['fb_title'] = strip_tags($new_instance['fb_title']);
$instance['fb_url'] = strip_tags($new_instance['fb_url']);
$instance['flickr_title'] = strip_tags($new_instance['flickr_title']);
$instance['flickr_url'] = strip_tags($new_instance['flickr_url']);
$instance['vimeo_title'] = strip_tags($new_instance['vimeo_title']);
$instance['vimeo_url'] = strip_tags($new_instance['vimeo_url']);
$instance['linkedin_title'] = strip_tags($new_instance['linkedin_title']);
$instance['linkedin_url'] = strip_tags($new_instance['linkedin_url']);
$instance['delicious_title'] = strip_tags($new_instance['delicious_title']);
$instance['delicious_url'] = strip_tags($new_instance['delicious_url']);
return $instance;
}
function form($instance) {
$instance = wp_parse_args(
(array) $instance, array( 
'title' => '',
'rss_title' => '',
'rss_url' => '',
'twitter_title' => '',
'twitter_url' => '',
'fb_title' => '',
'fb_url' => '',
'flickr_title' => '',
'flickr_url' => '',
'vimeo_title' => '',
'vimeo_url' => '',
'linkedin_title' => '',
'linkedin_url' => '',
'delicious_title' => '',
'delicious_url' => ''
) );
$title = strip_tags($instance['title']);
$rss_title = strip_tags($instance['rss_title']);
$rss_url = strip_tags($instance['rss_url']);
$twitter_title = strip_tags($instance['twitter_title']);
$twitter_url = strip_tags($instance['twitter_url']);
$fb_title = strip_tags($instance['fb_title']);
$fb_url = strip_tags($instance['fb_url']);
$flickr_title = strip_tags($instance['flickr_title']);
$flickr_url = strip_tags($instance['flickr_url']);
$vimeo_title = strip_tags($instance['vimeo_title']);
$vimeo_url = strip_tags($instance['vimeo_url']);
$linkedin_title = strip_tags($instance['linkedin_title']);
$linkedin_url = strip_tags($instance['linkedin_url']);
$delicious_title = strip_tags($instance['delicious_title']);
$delicious_url = strip_tags($instance['delicious_url']);
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>

<p><label for="<?php echo $this->get_field_id('rss_title'); ?>"><?php _e( 'RSS Text:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('rss_title'); ?>" name="<?php echo $this->get_field_name('rss_title'); ?>" type="text" value="<?php echo esc_attr($rss_title); ?>" /></label></p>

<p><label for="<?php echo $this->get_field_id('rss_url'); ?>"><?php _e( 'RSS  URL:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('rss_url'); ?>" name="<?php echo $this->get_field_name('rss_url'); ?>" type="text" value="<?php echo esc_attr($rss_url); ?>" /></label></p>

<p><label for="<?php echo $this->get_field_id('twitter_title'); ?>"><?php _e( 'Twitter Text:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('twitter_title'); ?>" name="<?php echo $this->get_field_name('twitter_title'); ?>" type="text" value="<?php echo esc_attr($twitter_title); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('twitter_url'); ?>"><?php _e( 'Twitter  URL:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('twitter_url'); ?>" name="<?php echo $this->get_field_name('twitter_url'); ?>" type="text" value="<?php echo esc_attr($twitter_url); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('fb_title'); ?>"><?php _e( 'Facebook Text:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('fb_title'); ?>" name="<?php echo $this->get_field_name('fb_title'); ?>" type="text" value="<?php echo esc_attr($fb_title); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('fb_url'); ?>"><?php _e( 'Facebook URL:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('fb_url'); ?>" name="<?php echo $this->get_field_name('fb_url'); ?>" type="text" value="<?php echo esc_attr($fb_url); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('flickr_title'); ?>"><?php _e( 'Flickr Text:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('flickr_title'); ?>" name="<?php echo $this->get_field_name('flickr_title'); ?>" type="text" value="<?php echo esc_attr($flickr_title); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('flickr_url'); ?>"><?php _e( 'Flickr URL:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('flickr_url'); ?>" name="<?php echo $this->get_field_name('flickr_url'); ?>" type="text" value="<?php echo esc_attr($flickr_url); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('vimeo_title'); ?>"><?php _e( 'Vimeo Text:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('vimeo_title'); ?>" name="<?php echo $this->get_field_name('vimeo_title'); ?>" type="text" value="<?php echo esc_attr($vimeo_title); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('vimeo_url'); ?>"><?php _e( 'Vimeo URL:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('vimeo_url'); ?>" name="<?php echo $this->get_field_name('vimeo_url'); ?>" type="text" value="<?php echo esc_attr($vimeo_url); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('linkedin_title'); ?>"><?php _e( 'LinkedIn Text:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('linkedin_title'); ?>" name="<?php echo $this->get_field_name('linkedin_title'); ?>" type="text" value="<?php echo esc_attr($linkedin_title); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('linkedin_url'); ?>"><?php _e( 'LinkedIn URL:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('linkedin_url'); ?>" name="<?php echo $this->get_field_name('linkedin_url'); ?>" type="text" value="<?php echo esc_attr($linkedin_url); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('delicious_title'); ?>"><?php _e( 'Delicious Text:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('delicious_title'); ?>" name="<?php echo $this->get_field_name('delicious_title'); ?>" type="text" value="<?php echo esc_attr($delicious_title); ?>" /></label></p>
<p><label for="<?php echo $this->get_field_id('delicious_url'); ?>"><?php _e( 'Delicious URL:', 'yoko' ); ?> <input class="widefat" id="<?php echo $this->get_field_id('delicious_url'); ?>" name="<?php echo $this->get_field_name('delicious_url'); ?>" type="text" value="<?php echo esc_attr($delicious_url); ?>" /></label></p>
<?php
}
}
// register Yoko SocialLinks Widget
add_action('widgets_init', create_function('', 'return register_widget("Yoko_SocialLinks_Widget");'));
tag.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<?php the_post(); ?>
<header class="page-header">
<h1 class="page-title"><?php
printf( __( 'Tag Archives: %s', 'yoko' ), '<span>' . single_tag_title( '', false ) . '</span>' );
?></h1>
</header><!--end page-header-->
<?php rewind_posts(); ?>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if (  $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-below">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'yoko' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?></div>
</nav><!-- end nav-below -->
<?php endif; ?>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
single.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>

<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>

<nav id="nav-below">
<div class="nav-previous"><?php previous_post_link( '%link', '' . _x( '&larr;  Previous Post', 'Previous post link', 'yoko' ) . '' ); ?></div>
<div class="nav-next"><?php next_post_link( '%link', __('') . _x( 'Next Post &rarr;', 'Next post link', 'yoko' ) . '' ); ?></div>
</nav><!-- end nav-below -->

</div><!-- end content -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
archive.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<?php the_post(); ?>
<header class="page-header">
<h1 class="page-title">
<?php if ( is_day() ) : ?>
<?php printf( __( 'Daily Archives: <span>%s</span>', 'yoko' ), get_the_date() ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( 'Monthly Archives: <span>%s</span>', 'yoko' ), get_the_date( 'F Y' ) ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( 'Yearly Archives: <span>%s</span>', 'yoko' ), get_the_date( 'Y' ) ); ?>
<?php else : ?>
<?php _e( 'Blog Archives', 'yoko' ); ?>
<?php endif; ?>
</h1>
</header><!-- end page header -->
<?php rewind_posts(); ?>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if (  $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-below">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'yoko' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?></div>
</nav><!-- end nav-below -->
<?php endif; ?>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
search.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php echo $wp_query->found_posts; ?> <?php printf( __( 'Search Results for: %s', 'yoko' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
</header><!--end page-header-->

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php get_template_part( 'content', 'search' ); ?>
<?php endwhile; ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if (  $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-below">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'yoko' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?></div>
</nav><!-- end nav-below -->
<?php endif; ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php _e( 'Nothing Found', 'yoko' ); ?></h1>
</header>
<div class="single-entry-content">
<p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'yoko' ); ?></p>
<?php get_search_form(); ?>
</div>
</article>
<?php endif; ?>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
footer.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
</div><!-- end wrap -->
<footer id="colophon" class="clearfix">
<p>Proudly powered by <a href="http://wordpress.org/" rel="generator">WordPress</a><span class="sep"> | </span><?php printf( __( 'Theme: %1$s by %2$s', 'yoko' ), 'Yoko', '<a href="http://www.elmastudio.de/wordpress-themes/" rel="designer">Elmastudio</a>' ); ?></p>
<a href="#page" class="top"><?php _e( 'Top', 'yoko' ); ?></a>
</footer><!-- end colophon -->

</div><!-- end page -->
<?php wp_footer(); ?>
</body>
</html>
image.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<?php the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="single-entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<p><span class="entry-date"><?php echo get_the_date(); ?></span> <span class="entry-author"><?php _e( 'by', 'yoko' ); ?> <?php the_author() ?></span> <?php if ( comments_open() ) : ?> | <?php comments_popup_link( __( '0 comments', 'yoko' ), __( '1 Comment', 'yoko' ), __( '% Comments', 'yoko' ) ); ?><?php endif; ?></p> 
</header><!-- end entry-header -->

<nav id="image-nav">
<span class="previous-image"><?php previous_image_link( false, __( '&larr; Previous Image' , 'yoko' ) ); ?></span>
<span class="next-image"><?php next_image_link( false, __( 'Next Image &rarr;' , 'yoko' ) ); ?></span>
</nav><!-- end image-nav -->
<div class="single-entry-content">
<div class="entry-attachment">
<div class="attachment">
<?php
/**
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
*/
$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// If there is more than 1 attachment in a gallery
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// get the URL of the next image attachment
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// or, if there's only 1 image, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
}
?>
<a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_size = apply_filters( 'theme_attachment_size',  800 );
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height.
?></a>
</div><!-- end attachment -->
<?php if ( ! empty( $post->post_excerpt ) ) : ?>
<div class="entry-caption">
<?php the_excerpt(); ?>
</div>
<?php endif; ?>
</div><!-- end entry-attachment -->
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>
</div><!-- end entry-content -->
<div class="clear"></div>

<footer class="entry-meta">
<p><?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>
<?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'yoko' ), get_trackback_url() ); ?>
<?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?>
<?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'yoko' ), get_trackback_url() ); ?>
<?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?>
<?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'yoko' ); ?>
<?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
<?php _e( 'Both comments and trackbacks are currently closed.', 'yoko' ); ?>
<?php endif; ?>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), ' <span class="edit-link">', '</span>' ); ?></p>
</footer><!-- end entry-utility -->
</article><!-- end post-<?php the_ID(); ?> -->
<?php comments_template(); ?>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
category.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<header class="page-header">
<h1 class="page-title"><?php printf( __( 'Category Archives: %s', 'yoko' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1>
<?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?>
</header><!-- end page header -->

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if (  $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-below">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'yoko' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?></div>
</nav><!-- end nav-below -->
<?php endif; ?>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
author.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="main">
<div id="content">
<?php the_post(); ?>
<header class="page-header">
<h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'yoko' ), "<a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a>" ); ?></h1>
</header><!-- end page header -->
<?php rewind_posts(); ?>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php get_template_part( 'content', get_post_format() ); ?>
<?php endwhile; ?>

<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if (  $wp_query->max_num_pages > 1 ) : ?>
<nav id="nav-below">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'yoko' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?></div>
</nav><!-- end nav-below -->
<?php endif; ?>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
theme-options.php
<?php
/**
 * Yoko Theme Options
 *
 * @package WordPress
 * @subpackage Yoko
 */
 
function yoko_admin_enqueue_scripts( $hook_suffix ) {
if ( $hook_suffix != 'appearance_page_theme_options' )
return;
wp_enqueue_style( 'yoko-theme-options', get_template_directory_uri() . '/includes/theme-options.css', false );
wp_enqueue_script( 'yoko-theme-options', get_template_directory_uri() . '/includes/theme-options.js', array( 'farbtastic' ) );
wp_enqueue_style( 'farbtastic' );
}
add_action( 'admin_enqueue_scripts', 'yoko_admin_enqueue_scripts' );
 
// Default options values
$yoko_options = array(
'custom_color' => '#009BC2',
'custom_logo' => ''
);
if ( is_admin() ) : // Load only if we are viewing an admin page
function yoko_register_settings() {
// Register the settings
register_setting( 'yoko_theme_options', 'yoko_options', 'yoko_validate_options' );
}
add_action( 'admin_init', 'yoko_register_settings' );


function yoko_theme_options() {
// Add theme options page to the addmin menu
add_theme_page( __( 'Theme Options', 'yoko'), __( 'Theme Options', 'yoko'), 'edit_theme_options', 'theme_options', 'yoko_theme_options_page');
}
add_action( 'admin_menu', 'yoko_theme_options' );
// Function to generate options page
function yoko_theme_options_page() {
global $yoko_options, $yoko_categories, $yoko_layouts;
if ( ! isset( $_REQUEST['updated'] ) )
$_REQUEST['updated'] = false; // This checks whether the form has just been submitted. ?>
<div class="wrap">
<?php screen_icon(); echo "<h2>" . get_current_theme() . __( ' Theme Options', 'yoko' ) . "</h2>";
// This shows the page's name and an icon if one has been provided ?>
<?php if ( false !== $_REQUEST['updated'] ) : ?>
<div class="updated fade"><p><strong><?php _e( 'Options saved', 'yoko' ); ?></strong></p></div>
<?php endif; // If the form has just been submitted, this shows the notification ?>
<form method="post" action="options.php">
<?php $settings = get_option( 'yoko_options', $yoko_options ); ?>

<?php settings_fields( 'yoko_theme_options' );
/* This function outputs some hidden fields required by the form,
including a nonce, a unique number used to ensure the form has been submitted from the admin page
and not somewhere else, very important for security */ ?>
<table class="form-table">
<tr valign="top"><th scope="row"><label for="custom_color"><?php _e('Custom Link Color', 'yoko'); ?></label></th>
<td>
<input id="custom_color" name="yoko_options[custom_color]" type="text" value="<?php  esc_attr_e($settings['custom_color']); ?>" />
<a href="#" class="pickcolor hide-if-no-js" id="custom_color-example"></a>
<input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'yoko' ); ?>">
<div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div>
<br />
<small class="description"><?php _e('e.g. #0000FF or blue (default link color: #009BC2)', 'yoko'); ?></small>
</td>
</tr>

<tr valign="top"><th scope="row"><label for="custom_logo"><?php _e('Custom Logo Image URL', 'yoko'); ?></label></th>
<td>
<input id="custom_logo" name="yoko_options[custom_logo]" type="text" value="<?php  esc_attr_e($settings['custom_logo']); ?>" />
<span class="description"> <a href="<?php echo home_url(); ?>/wp-admin/media-new.php" target="_blank"><?php _e('Upload your own logo image', 'yoko'); ?></a> <?php _e(' using the WordPress Media Library and insert the URL here', 'yoko'); ?> </span>
<br/><img style="margin-top: 10px;" src="<?php echo (get_option('custom_logo')) ? get_option('custom_logo') : get_template_directory_uri() . '/images/logo.png' ?>" />
</td>
</tr>
</table>
<p class="submit"><input type="submit" class="button-primary" value="<?php _e('Save Options', 'yoko'); ?>" /></p>
</form>
</div>
<?php
}
function yoko_validate_options( $input ) {
global $yoko_options, $yoko_categories, $yoko_layouts;
$settings = get_option( 'yoko_options', $yoko_options );

// We strip all tags from the text field, to avoid vulnerablilties like XSS
$input['custom_color'] = wp_filter_nohtml_kses( $input['custom_color'] );

return $input;
}
endif;  // EndIf is_admin()


// Custom CSS for Link Colors
function insert_custom_color(){
?>
<?php 
global $yoko_options;
$yoko_settings = get_option( 'yoko_options', $yoko_options );
?>
<?php if( $yoko_settings['custom_color'] != '' ) : ?>
<style type="text/css">
a {color: <?php echo $yoko_settings['custom_color'] ; ?>!important;}
#content .single-entry-header h1.entry-title {color: <?php echo $yoko_settings['custom_color'] ; ?>!important;}
input#submit:hover {background-color: <?php echo $yoko_settings['custom_color'] ; ?>!important;}
#content .page-entry-header h1.entry-title {color: <?php echo $yoko_settings['custom_color'] ; ?>!important;}
.searchsubmit:hover {background-color: <?php echo $yoko_settings['custom_color'] ; ?>!important;}
</style>
<?php endif; ?>
<?php
}
add_action('wp_head', 'insert_custom_color');
content.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-details">
<?php if ( has_post_thumbnail() ): ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
<?php endif; ?>
<p><?php echo get_the_date(); ?><br/>
<?php _e( 'by', 'yoko' ); ?> <?php the_author() ?><br/>
<?php comments_popup_link( __( '0 comments', 'yoko' ), __( '1 Comment', 'yoko' ), __( '% Comments', 'yoko' ) ); ?></p>
</div><!-- end entry-details -->
    
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'yoko' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</header><!-- end entry-header -->
        
<div class="entry-content">
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<?php the_excerpt(); ?>
<?php else : ?>
<?php the_content( __( 'Continue Reading &rarr;', 'yoko' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>
<?php endif; ?>

<footer class="entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | 
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' ); 
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | 
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '| <span class="edit-link">', '</span>' ); ?></p>
</footer><!-- end entry-meta -->
</div><!-- end entry-content -->

</article><!-- end post-<?php the_ID(); ?> -->
content-video.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

    <div class="entry-post-format">
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'yoko' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<p><?php echo get_the_date(); ?> <?php _e( 'by', 'yoko' ); ?> <?php the_author() ?> | <?php comments_popup_link( __( '0 comments', 'yoko' ), __( '1 Comment', 'yoko' ), __( '% Comments', 'yoko' ) ); ?></p>
</header><!-- end entry-header -->
<?php the_content( __( 'Continue Reading &rarr;', 'yoko' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>

<footer class="entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | 
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' ); 
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | 
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '| <span class="edit-link">', '</span>' ); ?></p>
</footer><!-- end entry-meta -->
</div><!-- end entry-post-format -->

</article><!-- end post-<?php the_ID(); ?> -->
content-single.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail()) : ?>
<div class="single-entry-details">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></a>
</div><!-- end single-entry-details -->
<?php endif; ?>
<header class="single-entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<p><span class="entry-date"><?php echo get_the_date(); ?></span> <span class="entry-author"><?php _e( 'by', 'yoko' ); ?> <?php the_author() ?></span> <?php if ( comments_open() ) : ?> | <?php comments_popup_link( __( '0 comments', 'yoko' ), __( '1 Comment', 'yoko' ), __( '% Comments', 'yoko' ) ); ?><?php endif; ?></p>
</header><!-- end single-entry-header -->

<div class="single-entry-content">
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<?php the_excerpt(); ?>
<?php else : ?>
<?php the_content( __( 'Continue Reading &rarr;', 'yoko' ) ); ?>
<div class="clear"></div>

<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>
<?php endif; ?>

<footer class="single-entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | 
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' ); 
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | 
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '| <span class="edit-link">', '</span>' ); ?></p>
</footer><!-- end entry-meta -->
<?php if ( get_the_author_meta( 'description' ) ) :  ?>
<div class="author-info">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'yoko_author_bio_avatar_size', 70 ) ); ?>
<div class="author-description">
<h3><?php printf( __( 'Author: %s', 'yoko' ), "<a href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a>" ); ?></h3>
<p><?php the_author_meta( 'description' ); ?></p>
</div><!-- end author-description -->
</div><!-- end author-info -->
<?php endif; ?>
</div><!-- end single-entry-content -->
</article><!-- end post-<?php the_ID(); ?> -->
<div class="clear"></div>
content-quote.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-details">
<p><?php echo get_the_date(); ?><br/>
<?php _e( 'by', 'yoko' ); ?> <?php the_author() ?><br/>
<?php comments_popup_link( __( '0 comments', 'yoko' ), __( '1 Comment', 'yoko' ), __( '% Comments', 'yoko' ) ); ?></p>
</div><!--end entry-details -->
        
<div class="entry-content">
<?php the_content( __( 'Continue Reading &rarr;', 'yoko' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>

<footer class="entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | 
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' ); 
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | 
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '| <span class="edit-link">', '</span>' ); ?></p>
</footer><!--end entry-meta-->
</div><!--end entry-content-->
</article><!-- end post-<?php the_ID(); ?> -->
content-page.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="page-entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!--end page-entry-hader-->
<div class="single-entry-content">
<?php the_content(); ?>
<div class="clear"></div>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '<span class="edit-link">', '</span>' ); ?>
</div><!--end entry-content-->

</article><!-- end post-<?php the_ID(); ?> -->
content-link.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-link">
<?php the_content( __( 'Continue Reading &rarr;', 'yoko' ) ); ?>
    
<footer class="entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | 
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' ); 
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | 
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '| <span class="edit-link">', '</span>' ); ?></p>
</footer><!-- end entry-meta-->     
</div><!-- end entry-link -->

</article><!-- end post-<?php the_ID(); ?> -->
content-image.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-post-format">
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'yoko' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<p><?php echo get_the_date(); ?> <?php _e( 'by', 'yoko' ); ?> <?php the_author() ?> | <?php comments_popup_link( __( '0 comments', 'yoko' ), __( '1 Comment', 'yoko' ), __( '% Comments', 'yoko' ) ); ?></p>
</header><!-- end entry-header -->
        
<?php the_content( __( 'Continue Reading &rarr;', 'yoko' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>

<footer class="entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | 
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' ); 
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | 
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '| <span class="edit-link">', '</span>' ); ?></p>
</footer><!-- end entry-meta -->
</div><!-- end entry-post-format -->

</article><!-- end post-<?php the_ID(); ?> -->
content-gallery.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-post-format">
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'yoko' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<p><?php echo get_the_date(); ?> <?php _e( 'by', 'yoko' ); ?> <?php the_author() ?>
<?php if ( comments_open() ) : ?> | <?php comments_popup_link( __( '0 comments', 'yoko' ), __( '1 Comment', 'yoko' ), __( '% Comments', 'yoko' ) ); ?><?php endif; ?></p>
</header><!-- end entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for search pages ?>
<div class="entry-summary">
<?php the_excerpt( __( 'View the pictures &rarr;', 'yoko' ) ); ?>
</div><!-- end entry-summary -->
<?php else : ?>
<?php if ( post_password_required() ) : ?>
<?php the_content( __( 'View the pictures &rarr;', 'yoko' ) ); ?>

<?php else : ?>
<?php
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
if ( $images ) :
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, 'medium' );
?>
<figure class="gallery-thumb">
<a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
</figure><!-- end gallery-thumb -->

<?php endif; ?>

<div class="entry-post-format">
<?php the_content( __( 'View the pictures &rarr;', 'yoko' ) ); ?>
<?php endif; ?>
<p class="pics-count"><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>', $total_images, 'yoko' ),
'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'yoko' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
number_format_i18n( $total_images )
); ?></p>

</div><!-- end entry-content-gallery -->
<?php endif; ?>

<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>
<footer class="entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | 
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' ); 
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | 
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '| <span class="edit-link">', '</span>' ); ?></p>
</footer><!-- end entry-meta-->
</div><!-- end entry-gallery -->

</article><!-- end post-<?php the_ID(); ?> -->
content-aside.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<div class="entry-details">
<p><?php echo get_the_date(); ?><br/>
<?php _e( 'by', 'yoko' ); ?> <?php the_author() ?><br/>
<?php comments_popup_link( __( '0 comments', 'yoko' ), __( '1 Comment', 'yoko' ), __( '% Comments', 'yoko' ) ); ?></p>
</div><!-- end entry-details -->

<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'yoko' ), 'after' => '</div>' ) ); ?>
<footer class="entry-meta">
<p><?php if ( count( get_the_category() ) ) : ?>
<?php printf( __( 'Categories: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> | 
<?php endif; ?>
<?php $tags_list = get_the_tag_list( '', ', ' ); 
if ( $tags_list ): ?>
<?php printf( __( 'Tags: %2$s', 'yoko' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> | 
<?php endif; ?>
<a href="<?php echo get_permalink(); ?>"><?php _e( 'Permalink ', 'yoko' ); ?></a>
<?php edit_post_link( __( 'Edit &rarr;', 'yoko' ), '| <span class="edit-link">', '</span>' ); ?></p>
</footer><!-- end entry-meta -->
</div><!-- end entry-content -->

</article><!-- end post-<?php the_ID(); ?> -->
full-width-page.php
<?php
/**
 * Template Name: Full-width, no sidebar
 * Description: A full-width template with no sidebar
 *
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>
<div id="wrap">
<div id="content" class="full-width">
<?php the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>

<?php comments_template( '', true ); ?>

</div><!-- end content -->

<?php get_footer(); ?>
404.php
<?php
/**
 * @package WordPress
 * @subpackage Yoko
 */
get_header(); ?>


<div id="wrap">
<div id="main">
<div id="content">
<article id="page>
<header class="page-entry-header">
<h1 class="entry-title"><?php _e( 'Not Found', 'yoko' ); ?></h1>
</header><!-- end page-entry-header -->

<div class="single-entry-content">
<p><?php _e( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', 'yoko' ); ?></p>
<?php get_search_form(); ?>
</div>

<script type="text/javascript">
// focus on search field after it has loaded
document.getElementById('s') && document.getElementById('s').focus();
</script>
</article>
</div><!-- end content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值