WordPress Child Theme

PHP Ease WordPress Child Theme Screenshot

This WordPress child theme is an example of how you should always customize the original WordPress Theme Framework. Download this theme along with the other, and always make any changes to the child theme. This way, whenever the original is improved upon or updated in any way, it will not affect the layout of your site one bit. This is mission critical, because I plan on updating the Framework to always be current and error-free with every new version that WordPress concocts, which is frequently. WordPress is always playing around with, and changing their code.

This child theme makes only a few minor tweaks to it's parent. (Considered major if you were using any other theme)

  • It places the Tagline inline with the Site Title
  • Moves the sidebar to the right of the page
  • Creates a custom comment form
  • Swaps the copyright and kudos locations

You can feel free to slash and burn everything here, except the style.css comments and import url at the top of the page. Other than that, the whole purpose of this theme is for experimentation and customization. Have fun!

Click to Download the PHP Ease WordPress Child Theme

 Subscribe to our feed

php-ease-child/functions.php

<?php 
 
add_filter('comment_form_defaults', 'custom_comment_form'); 
 
function custom_comment_form ($args) { 
  $commenter = wp_get_current_commenter(); 
  $req = get_option('require_name_email'); 
  $aria_req = ($req) ? " aria-required='true'" : ''; 
  $fields = array(); 
  $fields['author'] = '<p class="comment-form-author"><input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /><label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span>(required)</span>' : '' ) . '</p>'; 
  $fields['email'] = '<p class="comment-form-email"><input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span>(required) will not be published</span>' : '' ) . '</p>'; 
  $fields['url'] = '<p class="comment-form-url"><input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /><label for="url">' . __( 'Website' ) . '</label></p>'; 
  $args['fields'] = apply_filters('comment_form_default_fields', $fields); 
  $args['comment_notes_before'] = ''; 
  $args['comment_notes_after'] = ''; 
  return $args; 
} 
 
function display_page () { 
  global $wpage; 
  $wpage->doctype('xhtml', 'strict'); 
  $html = ''; 
 
 
  // Blueprint Template Example 
  include (TEMPLATEPATH . '/classes/Blueprint.php'); 
  $wpage->link(array('../css/bp.screen.css', 'jquery.js'), true); 
  $wpage->css('../css/bp.print.css', 'print'); 
  $wpage->css('../css/bp.ie.css', '', 'lt IE 7'); 
  $bp = new Blueprint(24); 
  $html .= $bp->page(); 
  $html .= $bp->row($wpage->get('header'));  
  $html .= $bp->double(18, 6, $wpage->get('content'), $wpage->get('sidebar')); 
  $html .= $bp->row($wpage->get('footer'));  
  $html .= $bp->close();  
  unset ($bp); 
   
  /* 
  // YUI Template Example 
  include (TEMPLATEPATH . '/classes/YUI.php'); 
  $wpage->link(array('../css/bp.screen.css', '../css/bp.yui.css', 'jquery.js'), true); 
  $yui = new YUI('950'); 
  $html .= $yui->page('left', 180, $wpage->get('sidebar'));  
  $html .= $yui->header($wpage->get('header'));  
  $html .= $yui->body($wpage->get('content'));  
  $html .= $yui->footer($wpage->get('footer'));  
  $html .= $yui->close();  
  unset ($yui);  
  */ 
   
  echo $wpage->display($html); 
  ob_end_flush(); 
} 
 
?>

php-ease-child/header.php

<h1 class="inline"><a href="<?php echo home_url(); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1> 
 
<h3 class="fancy"><?php bloginfo('description'); ?></h3>

php-ease-child/style.css

/* 
Theme Name:	PHP Ease Child 
Description:	Child Theme for PHP Ease 
Author:		Kyle Gadd 
Template:	php-ease 
Version:	0.1.0 
*/ 
 
@import url("../php-ease/style.css"); 
 
/* Body */ 
body { color: #000; } 
 
/* Header */ 
#header { margin: 2em 0; } 
#header h3 { 
	display: inline; 
	margin-left: 10px; 
	font-size: 1.75em; 
	} 
 
/* Sidebar */ 
#sidebar { 
	color: #333; 
	padding: 0 10px 10px; 
	border: 1px solid #ccc; 
	background: #eee; 
	-webkit-border-radius: 3px; 
	-khtml-border-radius: 3px; 
	-moz-border-radius: 3px; 
	border-radius: 3px; 
	} 
#sidebar h3 { 
	display: block; 
	border: 1px solid #3C61A5; 
	background: #6B92D7; 
	color: #fff; 
	text-align: center; 
	-webkit-border-radius: 3px; 
	-khtml-border-radius: 3px; 
	-moz-border-radius: 3px; 
	border-radius: 3px; 
	} 
#sidebar div.search { 
	margin:1.5em 0; 
	border:1px solid #AAA; 
	-webkit-border-radius: 3px; 
	-khtml-border-radius: 3px; 
	-moz-border-radius: 3px; 
	border-radius: 3px; 
	} 
 
/* Posts */ 
div.post h1, h2 { margin-bottom: .1em; } 
p.entry-tags { margin-bottom: 3em; } 
 
/* Navigation Links */ 
.navigation a:link, .navigation a:visited { color: #0645AD; } 
div.navigation a { 
	border: 1px solid #ccc; 
	padding: .1em 1em; 
	background: #eee; 
	font-size: 10px; 
	-webkit-border-radius: 3px; 
	-khtml-border-radius: 3px; 
	-moz-border-radius: 3px; 
	border-radius: 3px; 
	} 
div.navigation a:hover { 
	color: #fff; 
	background: #6B92D7; 
	border: 1px solid #3C61A5; 
	} 
 
/* Comments */ 
.comment-body em { padding-left: 46px; } 
#commentform input[type="text"] { margin-right: 10px; } 
#recaptcha_widget_div { margin-bottom: 1.5em; } 
#commentform { margin-bottom: 1.5em; } 
 
/* Footer */ 
#site-info { 
	float: left; 
	} 
#site-generator { 
	float: right; 
	}

comments powered by Disqus
Copyright © 2011 PHP-Ease.com - PHP Made Easy