Browse Source

Initial commit

master
Chris Wiegman 6 years ago
parent
commit
b4251b6fa1
32 changed files with 2395 additions and 1 deletions
  1. +56
    -0
      404.php
  2. +105
    -0
      archive.php
  3. +69
    -0
      comments.php
  4. +33
    -0
      content-none.php
  5. +26
    -0
      content-page.php
  6. +55
    -0
      content-search.php
  7. +62
    -0
      content-single.php
  8. +57
    -0
      content.php
  9. +25
    -0
      footer.php
  10. +130
    -0
      functions.php
  11. +37
    -0
      header.php
  12. +126
    -0
      inc/custom-header.php
  13. +26
    -0
      inc/customizer.php
  14. +89
    -0
      inc/extras.php
  15. +19
    -0
      inc/jetpack.php
  16. +135
    -0
      inc/template-tags.php
  17. +46
    -0
      index.php
  18. +36
    -0
      js/customizer.js
  19. +34
    -0
      js/navigation.js
  20. +18
    -0
      js/skip-link-focus-fix.js
  21. +297
    -0
      languages/chriswiegman.pot
  22. +6
    -0
      languages/readme.txt
  23. +22
    -0
      layouts/content-sidebar.css
  24. +22
    -0
      layouts/sidebar-content.css
  25. +35
    -0
      page.php
  26. +43
    -1
      readme.md
  27. +17
    -0
      rtl.css
  28. BIN
      screenshot.png
  29. +45
    -0
      search.php
  30. +15
    -0
      sidebar.php
  31. +32
    -0
      single.php
  32. +677
    -0
      style.css

+ 56
- 0
404.php View File

@ -0,0 +1,56 @@
<?php
/**
* The template for displaying 404 pages (not found).
*
* @package ChrisWiegman
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php _e( 'Oops! That page can&rsquo;t be found.', 'chriswiegman' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<p><?php _e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'chriswiegman' ); ?></p>
<?php get_search_form(); ?>
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
<?php if ( chriswiegman_categorized_blog() ) : // Only show the widget if site has multiple categories. ?>
<div class="widget widget_categories">
<h2 class="widget-title"><?php _e( 'Most Used Categories', 'chriswiegman' ); ?></h2>
<ul>
<?php
wp_list_categories( array(
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 10,
) );
?>
</ul>
</div><!-- .widget -->
<?php endif; ?>
<?php
/* translators: %1$s: smiley */
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'chriswiegman' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
?>
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
</div><!-- .page-content -->
</section><!-- .error-404 -->
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer(); ?>

+ 105
- 0
archive.php View File

@ -0,0 +1,105 @@
<?php
/**
* The template for displaying archive pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package ChrisWiegman
*/
get_header(); ?>
<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title">
<?php
if ( is_category() ) :
single_cat_title();
elseif ( is_tag() ) :
single_tag_title();
elseif ( is_author() ) :
printf( __( 'Author: %s', 'chriswiegman' ), '<span class="vcard">' . get_the_author() . '</span>' );
elseif ( is_day() ) :
printf( __( 'Day: %s', 'chriswiegman' ), '<span>' . get_the_date() . '</span>' );
elseif ( is_month() ) :
printf( __( 'Month: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'chriswiegman' ) ) . '</span>' );
elseif ( is_year() ) :
printf( __( 'Year: %s', 'chriswiegman' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'chriswiegman' ) ) . '</span>' );
elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
_e( 'Asides', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
_e( 'Galleries', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
_e( 'Images', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
_e( 'Videos', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
_e( 'Quotes', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
_e( 'Links', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-status' ) ) :
_e( 'Statuses', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
_e( 'Audios', 'chriswiegman' );
elseif ( is_tax( 'post_format', 'post-format-chat' ) ) :
_e( 'Chats', 'chriswiegman' );
else :
_e( 'Archives', 'chriswiegman' );
endif;
?>
</h1>
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php chriswiegman_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

+ 69
- 0
comments.php View File

@ -0,0 +1,69 @@
<?php
/**
* The template for displaying comments.
*
* The area of the page that contains both current comments
* and the comment form.
*
* @package ChrisWiegman
*/
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
}
?>
<div id="comments" class="comments-area">
<?php // You can start editing here -- including this comment! ?>
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'chriswiegman' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
?>
</h2>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'chriswiegman' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'chriswiegman' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'chriswiegman' ) ); ?></div>
</nav><!-- #comment-nav-above -->
<?php endif; // check for comment navigation ?>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
) );
?>
</ol><!-- .comment-list -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
<nav id="comment-nav-below" class="comment-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'chriswiegman' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'chriswiegman' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'chriswiegman' ) ); ?></div>
</nav><!-- #comment-nav-below -->
<?php endif; // check for comment navigation ?>
<?php endif; // have_comments() ?>
<?php
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
?>
<p class="no-comments"><?php _e( 'Comments are closed.', 'chriswiegman' ); ?></p>
<?php endif; ?>
<?php comment_form(); ?>
</div><!-- #comments -->

+ 33
- 0
content-none.php View File

@ -0,0 +1,33 @@
<?php
/**
* The template part for displaying a message that posts cannot be found.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package ChrisWiegman
*/
?>
<section class="no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php _e( 'Nothing Found', 'chriswiegman' ); ?></h1>
</header><!-- .page-header -->
<div class="page-content">
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'chriswiegman' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
<?php elseif ( is_search() ) : ?>
<p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'chriswiegman' ); ?></p>
<?php get_search_form(); ?>
<?php else : ?>
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'chriswiegman' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!-- .page-content -->
</section><!-- .no-results -->

+ 26
- 0
content-page.php View File

@ -0,0 +1,26 @@
<?php
/**
* The template used for displaying page content in page.php
*
* @package ChrisWiegman
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'chriswiegman' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php edit_post_link( __( 'Edit', 'chriswiegman' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->

+ 55
- 0
content-search.php View File

@ -0,0 +1,55 @@
<?php
/**
* The template part for displaying results in search pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package ChrisWiegman
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php chriswiegman_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<footer class="entry-footer">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'chriswiegman' ) );
if ( $categories_list && chriswiegman_categorized_blog() ) :
?>
<span class="cat-links">
<?php printf( __( 'Posted in %1$s', 'chriswiegman' ), $categories_list ); ?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'chriswiegman' ) );
if ( $tags_list ) :
?>
<span class="tags-links">
<?php printf( __( 'Tagged %1$s', 'chriswiegman' ), $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'chriswiegman' ), __( '1 Comment', 'chriswiegman' ), __( '% Comments', 'chriswiegman' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'chriswiegman' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->

+ 62
- 0
content-single.php View File

@ -0,0 +1,62 @@
<?php
/**
* @package ChrisWiegman
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<div class="entry-meta">
<?php chriswiegman_posted_on(); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'chriswiegman' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php
/* translators: used between list items, there is a space after the comma */
$category_list = get_the_category_list( __( ', ', 'chriswiegman' ) );
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', __( ', ', 'chriswiegman' ) );
if ( ! chriswiegman_categorized_blog() ) {
// This blog only has 1 category so we just need to worry about tags in the meta text
if ( '' != $tag_list ) {
$meta_text = __( 'This entry was tagged %2$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'chriswiegman' );
} else {
$meta_text = __( 'Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'chriswiegman' );
}
} else {
// But this blog has loads of categories so we should probably display them here
if ( '' != $tag_list ) {
$meta_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'chriswiegman' );
} else {
$meta_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'chriswiegman' );
}
} // end check for categories on this blog
printf(
$meta_text,
$category_list,
$tag_list,
get_permalink()
);
?>
<?php edit_post_link( __( 'Edit', 'chriswiegman' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->

+ 57
- 0
content.php View File

@ -0,0 +1,57 @@
<?php
/**
* @package ChrisWiegman
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<?php chriswiegman_posted_on(); ?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'chriswiegman' ) ); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'chriswiegman' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<?php
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'chriswiegman' ) );
if ( $categories_list && chriswiegman_categorized_blog() ) :
?>
<span class="cat-links">
<?php printf( __( 'Posted in %1$s', 'chriswiegman' ), $categories_list ); ?>
</span>
<?php endif; // End if categories ?>
<?php
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', __( ', ', 'chriswiegman' ) );
if ( $tags_list ) :
?>
<span class="tags-links">
<?php printf( __( 'Tagged %1$s', 'chriswiegman' ), $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if 'post' == get_post_type() ?>
<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'chriswiegman' ), __( '1 Comment', 'chriswiegman' ), __( '% Comments', 'chriswiegman' ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'chriswiegman' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->

+ 25
- 0
footer.php View File

@ -0,0 +1,25 @@
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package ChrisWiegman
*/
?>
</div><!-- #content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'chriswiegman' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'chriswiegman' ), 'WordPress' ); ?></a>
<span class="sep"> | </span>
<?php printf( __( 'Theme: %1$s by %2$s.', 'chriswiegman' ), 'ChrisWiegman', '<a href="http://www.chriswiegman.com" rel="designer">Chris Wiegman</a>' ); ?>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
<?php wp_footer(); ?>
</body>
</html>

+ 130
- 0
functions.php View File

@ -0,0 +1,130 @@
<?php
/**
* ChrisWiegman functions and definitions
*
* @package ChrisWiegman
*/
/**
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) ) {
$content_width = 640; /* pixels */
}
if ( ! function_exists( 'chriswiegman_setup' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which
* runs before the init hook. The init hook is too late for some features, such
* as indicating support for post thumbnails.
*/
function chriswiegman_setup() {
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory.
* If you're building a theme based on ChrisWiegman, use a find and replace
* to change 'chriswiegman' to the name of your theme in all the template files
*/
load_theme_textdomain( 'chriswiegman', get_template_directory() . '/languages' );
// Add default posts and comments RSS feed links to head.
add_theme_support( 'automatic-feed-links' );
/*
* Enable support for Post Thumbnails on posts and pages.
*
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
*/
//add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'chriswiegman' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
) );
/*
* Enable support for Post Formats.
* See http://codex.wordpress.org/Post_Formats
*/
add_theme_support( 'post-formats', array(
'aside', 'image', 'video', 'quote', 'link'
) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'chriswiegman_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
}
endif; // chriswiegman_setup
add_action( 'after_setup_theme', 'chriswiegman_setup' );
/**
* Register widget area.
*
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
*/
function chriswiegman_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'chriswiegman' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>',
) );
}
add_action( 'widgets_init', 'chriswiegman_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function chriswiegman_scripts() {
wp_enqueue_style( 'chriswiegman-style', get_stylesheet_uri() );
wp_enqueue_script( 'chriswiegman-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'chriswiegman-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'chriswiegman_scripts' );
/**
* Implement the Custom Header feature.
*/
//require get_template_directory() . '/inc/custom-header.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';

+ 37
- 0
header.php View File

@ -0,0 +1,37 @@
<?php
/**
* The header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package ChrisWiegman
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'chriswiegman' ); ?></a>
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
</div>
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle"><?php _e( 'Primary Menu', 'chriswiegman' ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #site-navigation -->
</header><!-- #masthead -->
<div id="content" class="site-content">

+ 126
- 0
inc/custom-header.php View File

@ -0,0 +1,126 @@
<?php
/**
* Sample implementation of the Custom Header feature
* http://codex.wordpress.org/Custom_Headers
*
* You can add an optional custom header image to header.php like so ...
<?php if ( get_header_image() ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="">
</a>
<?php endif; // End header image check. ?>
*
* @package ChrisWiegman
*/
/**
* Setup the WordPress core custom header feature.
*
* @uses chriswiegman_header_style()
* @uses chriswiegman_admin_header_style()
* @uses chriswiegman_admin_header_image()
*/
function chriswiegman_custom_header_setup() {
add_theme_support( 'custom-header', apply_filters( 'chriswiegman_custom_header_args', array(
'default-image' => '',
'default-text-color' => '000000',
'width' => 1000,
'height' => 250,
'flex-height' => true,
'wp-head-callback' => 'chriswiegman_header_style',
'admin-head-callback' => 'chriswiegman_admin_header_style',
'admin-preview-callback' => 'chriswiegman_admin_header_image',
) ) );
}
add_action( 'after_setup_theme', 'chriswiegman_custom_header_setup' );
if ( ! function_exists( 'chriswiegman_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog
*
* @see chriswiegman_custom_header_setup().
*/
function chriswiegman_header_style() {
$header_text_color = get_header_textcolor();
// If no custom options for text are set, let's bail
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value
if ( HEADER_TEXTCOLOR == $header_text_color ) {
return;
}
// If we get this far, we have custom styles. Let's do this.
?>
<style type="text/css">
<?php
// Has the text been hidden?
if ( 'blank' == $header_text_color ) :
?>
.site-title,
.site-description {
position: absolute;
clip: rect(1px, 1px, 1px, 1px);
}
<?php
// If the user has set a custom color for the text use that
else :
?>
.site-title a,
.site-description {
color: #<?php echo $header_text_color; ?>;
}
<?php endif; ?>
</style>
<?php
}
endif; // chriswiegman_header_style
if ( ! function_exists( 'chriswiegman_admin_header_style' ) ) :
/**
* Styles the header image displayed on the Appearance > Header admin panel.
*
* @see chriswiegman_custom_header_setup().
*/
function chriswiegman_admin_header_style() {
?>
<style type="text/css">
.appearance_page_custom-header #headimg {
border: none;
}
#headimg h1,
#desc {
}
#headimg h1 {
}
#headimg h1 a {
}
#desc {
}
#headimg img {
}
</style>
<?php
}
endif; // chriswiegman_admin_header_style
if ( ! function_exists( 'chriswiegman_admin_header_image' ) ) :
/**
* Custom header image markup displayed on the Appearance > Header admin panel.
*
* @see chriswiegman_custom_header_setup().
*/
function chriswiegman_admin_header_image() {
$style = sprintf( ' style="color:#%s;"', get_header_textcolor() );
?>
<div id="headimg">
<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
<div class="displaying-header-text" id="desc"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>
<?php if ( get_header_image() ) : ?>
<img src="<?php header_image(); ?>" alt="">
<?php endif; ?>
</div>
<?php
}
endif; // chriswiegman_admin_header_image

+ 26
- 0
inc/customizer.php View File

@ -0,0 +1,26 @@
<?php
/**
* ChrisWiegman Theme Customizer
*
* @package ChrisWiegman
*/
/**
* Add postMessage support for site title and description for the Theme Customizer.
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function chriswiegman_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
}
add_action( 'customize_register', 'chriswiegman_customize_register' );
/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/
function chriswiegman_customize_preview_js() {
wp_enqueue_script( 'chriswiegman_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'chriswiegman_customize_preview_js' );

+ 89
- 0
inc/extras.php View File

@ -0,0 +1,89 @@
<?php
/**
* Custom functions that act independently of the theme templates
*
* Eventually, some of the functionality here could be replaced by core features
*
* @package ChrisWiegman
*/
/**
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
*
* @param array $args Configuration arguments.
* @return array
*/
function chriswiegman_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'chriswiegman_page_menu_args' );
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function chriswiegman_body_classes( $classes ) {
// Adds a class of group-blog to blogs with more than 1 published author.
if ( is_multi_author() ) {
$classes[] = 'group-blog';
}
return $classes;
}
add_filter( 'body_class', 'chriswiegman_body_classes' );
/**
* Filters wp_title to print a neat <title> tag based on what is being viewed.
*
* @param string $title Default title text for current view.
* @param string $sep Optional separator.
* @return string The filtered title.
*/
function chriswiegman_wp_title( $title, $sep ) {
if ( is_feed() ) {
return $title;
}
global $page, $paged;
// Add the blog name
$title .= get_bloginfo( 'name', 'display' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) ) {
$title .= " $sep $site_description";
}
// Add a page number if necessary:
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
$title .= " $sep " . sprintf( __( 'Page %s', 'chriswiegman' ), max( $paged, $page ) );
}
return $title;
}
add_filter( 'wp_title', 'chriswiegman_wp_title', 10, 2 );
/**
* Sets the authordata global when viewing an author archive.
*
* This provides backwards compatibility with
* http://core.trac.wordpress.org/changeset/25574
*
* It removes the need to call the_post() and rewind_posts() in an author
* template to print information about the author.
*
* @global WP_Query $wp_query WordPress Query object.
* @return void
*/
function chriswiegman_setup_author() {
global $wp_query;
if ( $wp_query->is_author() && isset( $wp_query->post ) ) {
$GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author );
}
}
add_action( 'wp', 'chriswiegman_setup_author' );

+ 19
- 0
inc/jetpack.php View File

@ -0,0 +1,19 @@
<?php
/**
* Jetpack Compatibility File
* See: http://jetpack.me/
*
* @package ChrisWiegman
*/
/**
* Add theme support for Infinite Scroll.
* See: http://jetpack.me/support/infinite-scroll/
*/
function chriswiegman_jetpack_setup() {
add_theme_support( 'infinite-scroll', array(
'container' => 'main',
'footer' => 'page',
) );
}
add_action( 'after_setup_theme', 'chriswiegman_jetpack_setup' );

+ 135
- 0
inc/template-tags.php View File

@ -0,0 +1,135 @@
<?php
/**
* Custom template tags for this theme.
*
* Eventually, some of the functionality here could be replaced by core features.
*
* @package ChrisWiegman
*/
if ( ! function_exists( 'chriswiegman_paging_nav' ) ) :
/**
* Display navigation to next/previous set of posts when applicable.
*/
function chriswiegman_paging_nav() {
// Don't print empty markup if there's only one page.
if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {
return;
}
?>
<nav class="navigation paging-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'chriswiegman' ); ?></h1>
<div class="nav-links">
<?php if ( get_next_posts_link() ) : ?>
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'chriswiegman' ) ); ?></div>
<?php endif; ?>
<?php if ( get_previous_posts_link() ) : ?>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'chriswiegman' ) ); ?></div>
<?php endif; ?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
<?php
}
endif;
if ( ! function_exists( 'chriswiegman_post_nav' ) ) :
/**
* Display navigation to next/previous post when applicable.
*/
function chriswiegman_post_nav() {
// Don't print empty markup if there's nowhere to navigate.
$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
if ( ! $next && ! $previous ) {
return;
}
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'chriswiegman' ); ?></h1>
<div class="nav-links">
<?php
previous_post_link( '<div class="nav-previous">%link</div>', _x( '<span class="meta-nav">&larr;</span>&nbsp;%title', 'Previous post link', 'chriswiegman' ) );
next_post_link( '<div class="nav-next">%link</div>', _x( '%title&nbsp;<span class="meta-nav">&rarr;</span>', 'Next post link', 'chriswiegman' ) );
?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
<?php
}
endif;
if ( ! function_exists( 'chriswiegman_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*/
function chriswiegman_posted_on() {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string .= '<time class="updated" datetime="%3$s">%4$s</time>';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
$posted_on = sprintf(
_x( 'Posted on %s', 'post date', 'chriswiegman' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
$byline = sprintf(
_x( 'by %s', 'post author', 'chriswiegman' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
);
echo '<span class="posted-on">' . $posted_on . '</span><span class="byline"> ' . $byline . '</span>';
}
endif;
/**
* Returns true if a blog has more than 1 category.
*
* @return bool
*/
function chriswiegman_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'chriswiegman_categories' ) ) ) {
// Create an array of all the categories that are attached to posts.
$all_the_cool_cats = get_categories( array(
'fields' => 'ids',
'hide_empty' => 1,
// We only need to know if there is more than one category.
'number' => 2,
) );
// Count the number of categories that are attached to the posts.
$all_the_cool_cats = count( $all_the_cool_cats );
set_transient( 'chriswiegman_categories', $all_the_cool_cats );
}
if ( $all_the_cool_cats > 1 ) {
// This blog has more than 1 category so chriswiegman_categorized_blog should return true.
return true;
} else {
// This blog has only 1 category so chriswiegman_categorized_blog should return false.
return false;
}
}
/**
* Flush out the transients used in chriswiegman_categorized_blog.
*/
function chriswiegman_category_transient_flusher() {
// Like, beat it. Dig?
delete_transient( 'chriswiegman_categories' );
}
add_action( 'edit_category', 'chriswiegman_category_transient_flusher' );
add_action( 'save_post', 'chriswiegman_category_transient_flusher' );

+ 46
- 0
index.php View File

@ -0,0 +1,46 @@
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package ChrisWiegman
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>
<?php endwhile; ?>
<?php chriswiegman_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

+ 36
- 0
js/customizer.js View File

@ -0,0 +1,36 @@
/**
* Theme Customizer enhancements for a better user experience.
*
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
*/
( function( $ ) {
// Site title and description.
wp.customize( 'blogname', function( value ) {
value.bind( function( to ) {
$( '.site-title a' ).text( to );
} );
} );
wp.customize( 'blogdescription', function( value ) {
value.bind( function( to ) {
$( '.site-description' ).text( to );
} );
} );
// Header text color.
wp.customize( 'header_textcolor', function( value ) {
value.bind( function( to ) {
if ( 'blank' === to ) {
$( '.site-title, .site-description' ).css( {
'clip': 'rect(1px, 1px, 1px, 1px)',
'position': 'absolute'
} );
} else {
$( '.site-title, .site-description' ).css( {
'clip': 'auto',
'color': to,
'position': 'relative'
} );
}
} );
} );
} )( jQuery );

+ 34
- 0
js/navigation.js View File

@ -0,0 +1,34 @@
/**
* navigation.js
*
* Handles toggling the navigation menu for small screens.
*/
( function() {
var container, button, menu;
container = document.getElementById( 'site-navigation' );
if ( ! container )
return;
button = container.getElementsByTagName( 'button' )[0];
if ( 'undefined' === typeof button )
return;
menu = container.getElementsByTagName( 'ul' )[0];
// Hide menu toggle button if menu is empty and return early.
if ( 'undefined' === typeof menu ) {
button.style.display = 'none';
return;
}
if ( -1 === menu.className.indexOf( 'nav-menu' ) )
menu.className += ' nav-menu';
button.onclick = function() {
if ( -1 !== container.className.indexOf( 'toggled' ) )
container.className = container.className.replace( ' toggled', '' );
else
container.className += ' toggled';
};
} )();

+ 18
- 0
js/skip-link-focus-fix.js View File

@ -0,0 +1,18 @@
( function() {
var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var element = document.getElementById( location.hash.substring( 1 ) );
if ( element ) {
if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) )
element.tabIndex = -1;
element.focus();
}
}, false );
}
})();

+ 297
- 0
languages/chriswiegman.pot View File

@ -0,0 +1,297 @@
# Copyright (C) 2014 Automattic
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: _s 1.0-wpcom\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/_s\n"
"POT-Creation-Date: 2014-06-03 14:02:16+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: 404.php:15
msgid "Oops! That page can&rsquo;t be found."
msgstr ""
#: 404.php:19
msgid ""
"It looks like nothing was found at this location. Maybe try one of the links "
"below or a search?"
msgstr ""
#: 404.php:27
msgid "Most Used Categories"
msgstr ""
#. translators: %1$s: smiley
#: 404.php:44
msgid "Try looking in the monthly archives. %1$s"
msgstr ""
#: archive.php:27
msgid "Author: %s"
msgstr ""
#: archive.php:30
msgid "Day: %s"
msgstr ""
#: archive.php:33
msgid "Month: %s"
msgstr ""
#: archive.php:33
msgctxt "monthly archives date format"
msgid "F Y"
msgstr ""
#: archive.php:36
msgid "Year: %s"
msgstr ""
#: archive.php:36
msgctxt "yearly archives date format"
msgid "Y"
msgstr ""
#: archive.php:39
msgid "Asides"
msgstr ""
#: archive.php:42
msgid "Galleries"
msgstr ""
#: archive.php:45
msgid "Images"
msgstr ""
#: archive.php:48
msgid "Videos"
msgstr ""
#: archive.php:51
msgid "Quotes"
msgstr ""
#: archive.php:54
msgid "Links"
msgstr ""
#: archive.php:57
msgid "Statuses"
msgstr ""
#: archive.php:60
msgid "Audios"
msgstr ""
#: archive.php:63
msgid "Chats"
msgstr ""
#: archive.php:66 sidebar.php:16
msgid "Archives"
msgstr ""
#: comments.php:28
msgctxt "comments title"
msgid "One thought on &ldquo;%2$s&rdquo;"
msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
msgstr[0] ""
msgstr[1] ""
#: comments.php:35 comments.php:52
msgid "Comment navigation"
msgstr ""
#: comments.php:36 comments.php:53
msgid "&larr; Older Comments"
msgstr ""
#: comments.php:37 comments.php:54
msgid "Newer Comments &rarr;"
msgstr ""
#: comments.php:64
msgid "Comments are closed."
msgstr ""
#: content-none.php:13
msgid "Nothing Found"
msgstr ""
#: content-none.php:19
msgid ""
"Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
msgstr ""
#: content-none.php:23
msgid ""
"Sorry, but nothing matched your search terms. Please try again with some "
"different keywords."
msgstr ""
#: content-none.php:28
msgid ""
"It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps "
"searching can help."
msgstr ""
#: content-page.php:18 content-single.php:20 content.php:27
msgid "Pages:"
msgstr ""
#: content-page.php:24 content-single.php:60 content.php:61
msgid "Edit"
msgstr ""
#. translators: used between list items, there is a space after the comma
#: content-single.php:29 content-single.php:32 content.php:38 content.php:48
msgid ", "
msgstr ""
#: content-single.php:37
msgid ""
"This entry was tagged %2$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark"
"\">permalink</a>."
msgstr ""
#: content-single.php:39
msgid "Bookmark the <a href=\"%3$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:45
msgid ""
"This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" "
"rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:47
msgid ""
"This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" rel=\"bookmark"
"\">permalink</a>."
msgstr ""
#: content.php:24
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: content.php:42
msgid "Posted in %1$s"
msgstr ""
#: content.php:52
msgid "Tagged %1$s"
msgstr ""
#: content.php:58
msgid "Leave a comment"
msgstr ""
#: content.php:58
msgid "1 Comment"
msgstr ""
#: content.php:58
msgid "% Comments"
msgstr ""
#: footer.php:15
msgid "http://wordpress.org/"
msgstr ""
#: footer.php:15
msgid "Proudly powered by %s"
msgstr ""
#: footer.php:17
msgid "Theme: %1$s by %2$s."
msgstr ""
#: functions.php:45 header.php:32
msgid "Primary Menu"
msgstr ""
#: functions.php:80
msgid "Sidebar"
msgstr ""
#: header.php:23
msgid "Skip to content"
msgstr ""
#: inc/extras.php:63
msgid "Page %s"
msgstr ""
#: inc/template-tags.php:21
msgid "Posts navigation"
msgstr ""
#: inc/template-tags.php:25
msgid "<span class=\"meta-nav\">&larr;</span> Older posts"
msgstr ""
#: inc/template-tags.php:29
msgid "Newer posts <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: inc/template-tags.php:52
msgid "Post navigation"
msgstr ""
#: inc/template-tags.php:55
msgctxt "Previous post link"
msgid "<span class=\"meta-nav\">&larr;</span> %title"
msgstr ""
#: inc/template-tags.php:56
msgctxt "Next post link"
msgid "%title <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: inc/template-tags.php:82
msgctxt "post date"
msgid "Posted on %s"
msgstr ""
#: inc/template-tags.php:87
msgctxt "post author"
msgid "by %s"
msgstr ""
#: search.php:16
msgid "Search Results for: %s"
msgstr ""
#: sidebar.php:23
msgid "Meta"
msgstr ""
#. Theme Name of the plugin/theme
msgid "_s"
msgstr ""
#. Theme URI of the plugin/theme
msgid "http://underscores.me/"
msgstr ""
#. Description of the plugin/theme
msgid ""
"Hi. I'm a starter theme called <code>_s</code>, or <em>underscores</em>, if "
"you like. I'm a theme meant for hacking so don't use me as a <em>Parent "
"Theme</em>. Instead try turning me into the next, most awesome, WordPress "
"theme out there. That's what I'm here for."
msgstr ""
#. Author of the plugin/theme
msgid "Automattic"
msgstr ""
#. Author URI of the plugin/theme
msgid "http://automattic.com/"
msgstr ""

+ 6
- 0
languages/readme.txt View File

@ -0,0 +1,6 @@
Place your theme language files in this directory.
Please visit the following links to learn more about translating WordPress themes:
http://codex.wordpress.org/Translating_WordPress
http://codex.wordpress.org/Function_Reference/load_theme_textdomain

+ 22
- 0
layouts/content-sidebar.css View File

@ -0,0 +1,22 @@
/*
Theme Name: ChrisWiegman
Layout: Content-Sidebar
*/
.content-area {
float: left;
margin: 0 -25% 0 0;
width: 100%;
}
.site-main {
margin: 0 25% 0 0;
}
.site-content .widget-area {
float: right;
overflow: hidden;
width: 25%;
}
.site-footer {
clear: both;
width: 100%;
}

+ 22
- 0
layouts/sidebar-content.css View File

@ -0,0 +1,22 @@
/*
Theme Name: ChrisWiegman
Layout: Sidebar-Content
*/
.content-area {
float: right;
margin: 0 0 0 -25%;
width: 100%;
}
.site-main {
margin: 0 0 0 25%;
}
.site-content .widget-area {
float: left;
overflow: hidden;
width: 25%;
}
.site-footer {
clear: both;
width: 100%;
}

+ 35
- 0
page.php View File

@ -0,0 +1,35 @@
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package ChrisWiegman
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

+ 43
- 1
readme.md View File

@ -1 +1,43 @@
Readme
_s
===
Hi. I'm a starter theme called `_s`, or `underscores`, if you like. I'm a theme meant for hacking so don't use me as a Parent Theme. Instead try turning me into the next, most awesome, WordPress theme out there. That's what I'm here for.
My ultra-minimal CSS might make me look like theme tartare but that means less stuff to get in your way when you're designing your awesome theme. Here are some of the other more interesting things you'll find here:
* A just right amount of lean, well-commented, modern, HTML5 templates.
* A helpful 404 template.
* A sample custom header implementation in `inc/custom-header.php` that can be activated by uncommenting one line in `functions.php` and adding the code snippet found in the comments of `inc/custom-header.php` to your `header.php` template.
* Custom template tags in `inc/template-tags.php` that keep your templates clean and neat and prevent code duplication.
* Some small tweaks in `inc/extras.php` that can improve your theming experience.
* A script at `js/navigation.js` that makes your menu a toggled dropdown on small screens (like your phone), ready for CSS artistry. It's enqueued in `functions.php`.
* 2 sample CSS layouts in `layouts/` for a sidebar on either side of your content.
* Smartly organized starter CSS in `style.css` that will help you to quickly get your design off the ground.
* Licensed under GPLv2 or later. :) Use it to make something cool.
Getting Started
---------------
If you want to keep it simple, head over to http://underscores.me and generate your `_s` based theme from there. You just input the name of the theme you want to create, click the "Generate" button, and you get your ready-to-awesomize starter theme.
If you want to set things up manually, download `_s` from GitHub. The first thing you want to do is copy the `_s` directory and change the name to something else (like, say, `megatherium`), and then you'll need to do a five-step find and replace on the name in all the templates.
1. Search for `'_s'` (inside single quotations) to capture the text domain.
2. Search for `_s_` to capture all the function names.
3. Search for `Text Domain: _s` in style.css.
4. Search for <code>&nbsp;_s</code> (with a space before it) to capture DocBlocks.
5. Search for `_s-` to capture prefixed handles.
OR
* Search for: `'_s'` and replace with: `'megatherium'`
* Search for: `_s_` and replace with: `megatherium_`
* Search for: `Text Domain: _s` and replace with: `Text Domain: megatherium` in style.css.
* Search for: <code>&nbsp;_s</code> and replace with: <code>&nbsp;Megatherium</code>
* Search for: `_s-` and replace with: `megatherium-`
Then, update the stylesheet header in `style.css` and the links in `footer.php` with your own information. Next, update or delete this readme.
Now you're ready to go! The next step is easy to say, but harder to do: make an awesome WordPress theme. :)
Good luck!

+ 17
- 0
rtl.css View File

@ -0,0 +1,17 @@
/*
Theme Name: ChrisWiegman
Adding support for language written in a Right To Left (RTL) direction is easy -
it's just a matter of overwriting all the horizontal positioning attributes
of your CSS stylesheet in a separate stylesheet file named rtl.css.
http://codex.wordpress.org/Right_to_Left_Language_Support
*/
/*
body {
direction: rtl;
unicode-bidi: embed;
}
*/

BIN
screenshot.png View File

Before After
Width: 880  |  Height: 660  |  Size: 6.6 KiB

+ 45
- 0
search.php View File

@ -0,0 +1,45 @@
<?php
/**
* The template for displaying search results pages.
*
* @package ChrisWiegman
*/
get_header(); ?>
<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'chriswiegman' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
</header><!-- .page-header -->
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called content-search.php and that will be used instead.
*/
get_template_part( 'content', 'search' );
?>
<?php endwhile; ?>
<?php chriswiegman_paging_nav(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

+ 15
- 0
sidebar.php View File

@ -0,0 +1,15 @@
<?php
/**
* The sidebar containing the main widget area.
*
* @package ChrisWiegman
*/
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
return;
}
?>
<div id="secondary" class="widget-area" role="complementary">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</div><!-- #secondary -->

+ 32
- 0
single.php View File

@ -0,0 +1,32 @@
<?php
/**
* The template for displaying all single posts.
*
* @package ChrisWiegman
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'single' ); ?>
<?php chriswiegman_post_nav(); ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() ) :
comments_template();
endif;
?>
<?php endwhile; // end of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

+ 677
- 0
style.css View File

@ -0,0 +1,677 @@
/*
Theme Name: ChrisWiegman
Theme URI: http://underscores.me/
Author: Chris Wiegman
Author URI: http://www.chriswiegman.com
Description: Theme for ChrisWiegman.com based on ChrisWiegman
Version: 1.0-wpcom
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chriswiegman
Domain Path: /languages/
Tags:
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
ChrisWiegman is based on Underscores http://underscores.me/, (C) 2012-2014 Automattic, Inc.
Resetting and rebuilding styles have been helped along thanks to the fine work of
Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html
along with Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
and Blueprint http://www.blueprintcss.org/
*/
/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 - Reset
2.0 - Typography
3.0 - Elements
4.0 - Forms
5.0 - Navigation
5.1 - Links
5.2 - Menus
6.0 - Accessibility
7.0 - Alignments
8.0 - Clearings
9.0 - Widgets
10.0 - Content
10.1 - Posts and pages
10.2 - Asides
10.3 - Comments
11.0 - Infinite scroll
12.0 - Media
12.1 - Captions
12.2 - Galleries
--------------------------------------------------------------*/
/*--------------------------------------------------------------
1.0 - Reset
--------------------------------------------------------------*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
border: 0;
font-family: inherit;
font-size: 100%;
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline;
}
html {
font-size: 62.5%; /* Corrects text resizing oddly in IE6/7 when body font-size is set using em units http://clagnut.com/blog/348/#c790 */
overflow-y: scroll; /* Keeps page centered in all browsers regardless of content height */
-webkit-text-size-adjust: 100%; /* Prevents iOS text size adjust after orientation change, without disabling user zoom */
-ms-text-size-adjust: 100%; /* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ */
}
*,
*:before,
*:after { /* apply a natural box layout model to all elements; see http://www.paulirish.com/2012/box-sizing-border-box-ftw/ */
-webkit-box-sizing: border-box; /* Not needed for modern webkit but still used by Blackberry Browser 7.0; see http://caniuse.com/#search=box-sizing */
-moz-box-sizing: border-box; /* Still needed for Firefox 28; see http://caniuse.com/#search=box-sizing */
box-sizing: border-box;
}
body {
background: #fff; /* Fallback for when there is no custom background color defined. */
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
nav,
section {
display: block;