Permalink
Browse files

Revised HTML5 Basic starter theme

Joachim Kudish was Kind enough to review my theme and so a few changes
were made.
Reset.css was removed and replaced by normalize.css
HTML5 js was moved to it's own folder
The header.php was modified by getting rid of all the seo stuff - that
can be done with a plugin
The functions.php file was cleaned up and optimized.
I also ran the theme-check plugin and fixed a few niggly things
  • Loading branch information...
1 parent 5e67251 commit 632b829a88574eddb5b3eb20c1807fc815ad3b59 @crondeau committed Dec 30, 2011
Showing with 92 additions and 166 deletions.
  1. +2 −4 404.php
  2. +6 −5 archive.php
  3. +2 −4 comments.php
  4. BIN favicon.ico
  5. +1 −2 footer.php
  6. +15 −20 functions.php
  7. +8 −24 header.php
  8. +5 −3 index.php
  9. 0 { → js}/html5.js
  10. +40 −0 normalize.css
  11. +6 −0 readme.txt
  12. +0 −93 reset.css
  13. +1 −1 search.php
  14. +1 −5 sidebar.php
  15. +5 −5 style.css
View
@@ -1,11 +1,9 @@
-<?php header("HTTP/1.1 404 Not Found"); ?>
-<?php header("Status: 404 Not Found"); ?>
<?php get_header(); ?>
<section id="main">
<section id="content">
<article class="hentry">
- <h1>Oops.. File or page not found.</h1>
- <p>We've recently made changes to our website and the page you are looking for might have been deleted or moved. Please <a href="<?php echo home_url(); ?>">visit our home page instead</a>. </p>
+ <h1>Oops... File or page not found.</h1>
+ <p>We've recently made changes to our website and the page you are looking for might have been deleted or moved. Please <a href="<?php echo home_url(); ?>">visit our home page instead</a>.</p>
<p>Sorry for the inconvenience.</p>
</article>
</section>
View
@@ -12,13 +12,13 @@
<h1>Posts Tagged: <?php single_tag_title(); ?></h1>
<?php }elseif (is_day()) { ?>
- <h1>Archive for <?php the_time('F jS, Y'); ?></h1>
+ <h1>Archive for <?php echo get_the_date(); ?></h1>
<?php }elseif (is_month()) { ?>
- <h1>Archive for <?php the_time('F, Y'); ?></h1>
+ <h1>Archive for <?php echo get_the_date( _x( 'F Y', 'monthly archives date format', 'blm_basic' ) ) ?></h1>
<?php }elseif (is_year()) { ?>
- <h1>Archive for <?php the_time('Y'); ?></h1>
+ <h1>Archive for <?php echo get_the_date( _x( 'Y', 'yearly archives date format', 'blm_basic' ) ) ?></h1>
<?php } elseif (is_search()) { ?>
<h1>Search Results</h1>
@@ -35,15 +35,16 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- <?php the_content(__('Read more'));?>
+ <?php the_content(__('Read more', 'blm_basic'));?>
<?php get_template_part('inc/meta'); ?>
</article>
<?php comments_template(); ?>
<?php endwhile; else: ?>
- <p>Sorry, seems like there aren't any posts.</p>
+
+ <p><?php _e( 'Sorry, there are currently no posts.', 'blm_basic' ); ?></p>
<?php endif; ?>
<?php get_template_part('inc/nav'); ?>
View
@@ -1,8 +1,7 @@
<div class="clear"></div>
<?php
-// Do not delete these lines
- if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
- die ('Please do not load this page directly. Thanks!');
+ if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) )
+ die ( 'Please do not load this page directly. Thanks.' );
if ( post_password_required() ) { ?>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
@@ -39,7 +38,6 @@
<?php endif; ?>
<?php endif; ?>
-
<?php if ( comments_open() ) : ?>
<?php comment_form(); ?>
View
Binary file not shown.
View
@@ -1,8 +1,7 @@
-<!-- begin footer -->
<footer>
<p>&copy; <?php echo date("Y"); ?> <?php bloginfo('name'); ?></p>
</footer>
</div><!-- end of wrapper -->
<?php wp_footer(); ?>
</body>
-</html>
+</html>
View
@@ -1,26 +1,26 @@
<?php
add_action( 'after_setup_theme', 'blm_theme_setup' );
function blm_theme_setup() {
-
+
global $content_width;
/* Set the $content_width for things such as video embeds. */
if ( !isset( $content_width ) )
- $content_width = 600;
+ $content_width = 600;
/* Add theme support for automatic feed links. */
add_theme_support( 'automatic-feed-links' );
-
+
/* Add theme support for post thumbnails (featured images). */
add_theme_support( 'post-thumbnails');
-
- /* Add your nav menus function to the 'init' action hook. */
- add_action( 'init', 'blm_register_menus' );
-
- /* Add custom actions. */
- add_action( 'widgets_init', 'blm_register_sidebars' );
}
-// Add menu features
+/* Add your nav menus function to the 'init' action hook. */
+add_action( 'init', 'blm_register_menus' );
+
+/* Add custom actions. */
+add_action( 'widgets_init', 'blm_register_sidebars' );
+
+// Add menu features
function blm_register_menus() {
register_nav_menus(array('primary'=>__('Primary Menu'),));
}
@@ -36,8 +36,8 @@ function blm_register_sidebars() {
register_sidebar(
array(
'id' => 'primary',
- 'name' => __( 'Primary Sidebar' ),
- 'description' => __( 'The following widgets will appear in the main sidebar div.' ),
+ 'name' => __( 'Primary Sidebar', 'blm_basic' ),
+ 'description' => __( 'The following widgets will appear in the main sidebar div.', 'blm_basic' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h4>',
@@ -47,11 +47,9 @@ function blm_register_sidebars() {
}
function blm_init_method() {
- /* Enqueue custom Javascript here using wp_enqueue_script(). */
- if ( !is_admin() ) {
- wp_deregister_script('jquery');
- wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"), false);
- wp_enqueue_script('jquery');
+ /* Load jQuery but only in front end */
+ if ( !is_admin() ) {
+ wp_enqueue_script('jquery');
}
/* Load the comment reply JavaScript. */
@@ -64,12 +62,9 @@ function blm_init_method() {
// remove junk from head
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_generator');
-remove_action('wp_head', 'feed_links', 2);
-remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'start_post_rel_link', 10, 0);
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
-
?>
View
@@ -1,37 +1,21 @@
<!DOCTYPE html>
-<html>
+<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
- <title><?php if ( is_home() || is_front_page() ) {
- bloginfo( 'name' );
- if( get_bloginfo( 'description' ) )
- echo ' | ' ; bloginfo( 'description' );
- } elseif (is_404()) {
- echo '404 Not Found'; echo ' | ' ; bloginfo( 'name' );
- } elseif (is_category()) {
- echo 'Category:'; wp_title('');
- } elseif (is_search()) {
- echo 'Search Results'; echo ' | ' ; bloginfo( 'name' );
- } elseif ( is_day() || is_month() || is_year() ) {
- echo 'Archives:'; wp_title('');
- } else {
- echo wp_title(''); echo ' | ' ; bloginfo( 'name' );
- }
- ?></title>
-<meta http-equiv="content-type" content="<?php bloginfo('html_type') ?>; charset=<?php bloginfo('charset') ?>" />
-<link rel="profile" href="http://gmpg.org/xfn/11" />
-<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
-<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
-<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />
+ <title><?php wp_title(' &mdash; ', true, 'right'); ?><?php bloginfo('name'); ?></title>
+ <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
+ <link rel="profile" href="http://gmpg.org/xfn/11" />
+ <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
+ <link rel="shortcut icon" href="<?php echo get_template_directory_uri() ?>/favicon.ico" />
<!--[if lt IE 9]>
-<script src="<?php echo get_template_directory_uri(); ?>/html5.js" type="text/javascript"></script>
+<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="wrap">
<header id="branding">
- <div id="logo"><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></div>
+ <div id="logo"><a href="<?php echo site_url() ?>/"><?php bloginfo('name'); ?></a></div>
<div id="tagline"><?php bloginfo('description'); ?></div>
</header>
<nav id="top_nav">
View
@@ -5,15 +5,17 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- <?php the_content(__('Read more'));?>
+ <?php the_content(__('Read more', 'blm_basic'));?>
<?php get_template_part('inc/meta'); ?>
</article>
<?php comments_template(); ?>
<?php endwhile; else: ?>
- <h2>Not found.</h2>
- <p>Sorry, you seem to be looking for something that simply isn’t here.</p>
+
+ <h2><?php _e( 'Not Found', 'blm_basic' ); ?></h2>
+ <p><?php _e( 'Sorry, you seem to be looking for something that simply is not here.', 'blm_basic' ); ?></p>
+
<?php endif; ?>
<?php get_template_part('inc/nav'); ?>
</section>
View
File renamed without changes.
View
@@ -0,0 +1,40 @@
+/* normalize.css 2011-11-04T15:38 UTC - http://github.com/necolas/normalize.css */
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}
+audio,canvas,video{display:inline;zoom:1px}
+html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
+body,button,input,select,textarea{font-family:sans-serif}
+a:focus{outline:thin dotted}
+a:hover,a:active{outline:0}
+h1{font-size:2em}
+abbr[title]{border-bottom:1px dotted}
+b,strong{font-weight:700}
+blockquote{margin:1em 40px}
+dfn{font-style:italic}
+mark{background:#ff0;color:#000}
+pre,code,kbd,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}
+pre{white-space:pre-wrap;word-wrap:break-word}
+q{quotes:none}
+q:before,q:after{content:none}
+small{font-size:75%}
+sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
+sup{top:-0.5em}
+sub{bottom:-0.25em}
+ul,ol{margin-left:0;padding:0 0 0 40px}
+dd{margin:0 0 0 40px}
+nav ul,nav ol{list-style:none;list-style-image:none}
+img{border:0;-ms-interpolation-mode:bicubic}
+svg:not(:root){overflow:hidden}
+fieldset{border:1px solid silver;margin:0 2px;padding:0.35em 0.625em 0.75em}
+legend{border:0;margin-left:-7px}
+button,input,select,textarea{font-size:100%;vertical-align:middle;margin:0}
+button,input{line-height:normal}
+button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;overflow:visible}
+input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
+input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
+input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
+button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
+textarea{overflow:auto;vertical-align:top}
+table{border-collapse:collapse;border-spacing:0}
+td{vertical-align:top}
+audio:not([controls]),[hidden]{display:none}
+body,figure,form{margin:0}
View
@@ -4,6 +4,12 @@ This basic starter theme is an html5 version of my original basic starter theme.
(https://github.com/crondeau/BLM-Basic-WordPress-theme)
It's exactly the same as the original but html5 ready.
+The basic theme was started 4 years ago with a now retired theme call by fSpring widgets by Fredrik Fahlstad.
+At the time, Kubrick was very popular but I felt it just contained too much junk.
+Using the fSpring widgets theme, I cleaned it up and created a basic starter theme to use for all of my custom themes.
+
+With the release of Twenty Eleven, Twenty Ten, Sandbox, Joachim Kudish, Devin Price's Portfolio theme, Michael Fields Ghostbird and Elliot Jay Stocks, Starkers, I've had the chance to look at how things are now done and I've refined my theme and improved it immensely.
+
--------------------------------------------------------
THIS THEME IS TO BE USED FOR BUILDING CUSTOM THEMES ONLY.
View
@@ -1,93 +0,0 @@
-/*
-html5doctor.com Reset Stylesheet
-v1.6.1
-Last Updated: 2010-09-17
-Author: Richard Clark - http://richclarkdesign.com
-Twitter: @rich_clark
-*/
-
-html, body, div, span, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-abbr, address, cite, code,
-del, dfn, em, img, ins, kbd, q, samp,
-small, strong, sub, sup, var,
-b, i,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, figcaption, figure,
-footer, header, hgroup, menu, nav, section, summary,
-time, mark, audio, video {
- margin:0;
- padding:0;
- border:0;
- outline:0;
- font-size:100%;
- vertical-align:baseline;
- background:transparent;
-}
-
-body {
- line-height:1;
-}
-
-article,aside,details,figcaption,figure,
-footer,header,hgroup,menu,nav,section {
- display:block;
-}
-
-nav ul {
- list-style:none;
-}
-
-blockquote, q {
- quotes:none;
-}
-
-blockquote:before, blockquote:after,
-q:before, q:after {
- content:'';
- content:none;
-}
-
-a {
- margin:0;
- padding:0;
- font-size:100%;
- vertical-align:baseline;
- background:transparent;
-}
-a img {border:none;}
-
-/* change colours to suit your needs */
-ins {
- background-color:#ff9;
- color:#000;
- text-decoration:none;
-}
-
-/* change colours to suit your needs */
-mark {
- background-color:#ff9;
- color:#000;
- font-style:italic;
- font-weight:bold;
-}
-
-del {
- text-decoration: line-through;
-}
-
-abbr[title], dfn[title] {
- border-bottom:1px dotted;
- cursor:help;
-}
-
-table {
- border-collapse:collapse;
- border-spacing:0;
-}
-
-input, select {
- vertical-align:middle;
-}
View
@@ -6,7 +6,7 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- <?php the_excerpt(__('Read more'));?>
+ <?php the_excerpt(__('Read more', 'blm_basic'));?>
<?php get_template_part('inc/meta'); ?>
View
@@ -1,9 +1,5 @@
<section id="sidebar">
- <?php if ( is_active_sidebar( 'primary' ) ) : ?>
-
- <?php dynamic_sidebar( 'primary' ); ?>
-
- <?php else : ?>
+ <?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
<aside id="search" class="widget widget_search">
<?php get_search_form(); ?>
Oops, something went wrong.

0 comments on commit 632b829

Please sign in to comment.