This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// recreates the doctype section, html5boilerplate.com style with conditional classes | |
// http://scottnix.com/html5-header-with-thematic/ | |
function childtheme_create_doctype() { | |
$content = "<!doctype html>" . "\n"; | |
$content .= '<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" dir="' . get_bloginfo ('text_direction') . '" lang="'. get_bloginfo ('language') . '"> <![endif]-->' . "\n"; | |
$content .= '<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" dir="' . get_bloginfo ('text_direction') . '" lang="'. get_bloginfo ('language') . '"> <![endif]-->'. "\n"; | |
$content .= '<!--[if IE 8]> <html class="no-js lt-ie9" dir="' . get_bloginfo ('text_direction') . '" lang="'. get_bloginfo ('language') . '"> <![endif]-->' . "\n"; | |
$content .= "<!--[if gt IE 8]><!-->" . "\n"; | |
$content .= "<html class=\"no-js\""; | |
return $content; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: Front Page | |
. | |
Take a look at the functions.php for this theme to see how the random content is included. | |
. | |
*/ | |
?> | |
<?php get_header() ?> | |
<div id="container" class="feature"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sizing for custom header | |
// http://codex.wordpress.org/Custom_Headers | |
$headerargs = array( | |
'flex-width' => true, | |
'width' => 1140, | |
'flex-height' => true, | |
'height' => 250, | |
'default-image' => get_stylesheet_directory_uri() . '/images/header.png', | |
); | |
add_theme_support( 'custom-header', $headerargs ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Filter the opening tags of the widget areas | |
* | |
* Replace the div with aside, remove the wrapping ul | |
* | |
* @since 0.1 | |
*/ | |
function before_widget_area($content) { | |
$content = str_replace( '<div', '<aside ', $content); | |
$content = str_replace( '<ul class="xoxo">', '<div class="inner">', $content); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function childtheme_override_index_loop() { | |
// Count the number of posts so we can insert a widgetized area | |
$count = 1; | |
while ( have_posts() ) : the_post(); | |
// action hook for insterting content above #post | |
thematic_abovepost(); | |
echo '<div id="post-' . get_the_ID() . '" '; | |
// Checking for defined constant to enable Thematic's post classes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add custom WP 3.0 menus | |
function gallery_navigation() { | |
global $post; | |
if ( !is_single() ) : ?> | |
<div id="nav-below" class="navigation"> | |
<?php if(function_exists('wp_pagenavi')): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function childtheme_override_content() { | |
global $thematic_content_length; | |
if ( strtolower($thematic_content_length) == 'full' ) { | |
$post = get_the_content( thematic_more_text() ); | |
$post = apply_filters('the_content', $post); | |
$post = str_replace(']]>', ']]>', $post); | |
} elseif ( strtolower($thematic_content_length) == 'excerpt') { | |
$post = ''; | |
$post .= get_the_excerpt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function childtheme_custom_postheader($postheader) { | |
if ( has_post_format( 'aside' ) && ! is_single()) { | |
$postheader = '<h2 class="entry-title">'; | |
$postheader .= get_the_title(); | |
$postheader .= '</h2>'; | |
} | |
return $postheader; | |
} | |
add_filter ('thematic_postheader', 'childtheme_custom_postheader'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// remove header bits, previously this was done to Thematic itself, but you aren't suppose to do that, it is as simple as. | |
function childtheme_remove_headerbits() { | |
remove_action('thematic_header', 'thematic_blogtitle', 3); | |
remove_action('thematic_header', 'thematic_blogdescription', 5); | |
} | |
add_action('init', 'childtheme_remove_headerbits'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add dreamweaver preloadimages attributes to body tag | |
// http://thematictheme.com/forums/topic/add-onload-to-body-on-homepage-only/ | |
function childtheme_override_body() { | |
echo '<body '; | |
echo 'onload="MM_preloadImages(\'images/home_over_button.jpg\')" '; | |
body_class(); | |
echo '>' . "\n\n"; | |
} | |
// |
OlderNewer