Created
May 25, 2011 09:58
-
-
Save mushon/990698 to your computer and use it in GitHub Desktop.
Thematic functions and styles from today
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 | |
// | |
// Custom Child Theme Functions | |
// | |
// I've included a "commented out" sample function below that'll add a home link to your menu | |
// More ideas can be found on "A Guide To Customizing The Thematic Theme Framework" | |
// http://themeshaper.com/thematic-for-wordpress/guide-customizing-thematic-theme-framework/ | |
// Adds a home link to your menu | |
// http://codex.wordpress.org/Template_Tags/wp_page_menu | |
//function childtheme_menu_args($args) { | |
// $args = array( | |
// 'show_home' => 'Home', | |
// 'sort_column' => 'menu_order', | |
// 'menu_class' => 'menu', | |
// 'echo' => true | |
// ); | |
// return $args; | |
//} | |
//add_filter('wp_page_menu_args','childtheme_menu_args'); | |
// Unleash the power of Thematic's dynamic classes | |
// | |
// define('THEMATIC_COMPATIBLE_BODY_CLASS', true); | |
// define('THEMATIC_COMPATIBLE_POST_CLASS', true); | |
// Unleash the power of Thematic's comment form | |
// | |
// define('THEMATIC_COMPATIBLE_COMMENT_FORM', true); | |
// Unleash the power of Thematic's feed link functions | |
// | |
// define('THEMATIC_COMPATIBLE_FEEDLINKS', true); | |
/* Header | |
--------------------------------------------------------- */ | |
function additional_header_content() { | |
// your stuff goes inside here | |
?> | |
<img src="<?php bloginfo( 'stylesheet_directory' ); ?>/assets/logo.png" alt="yanna's logo"/> | |
<?php | |
} | |
//add_action('thematic_header', 'additional_header_content', 2); | |
//add_action('thematic_abovepost', 'additional_header_content'); | |
/* Home Page | |
--------------------------------------------------------- */ | |
function childtheme_hp_thumbs(){ | |
} | |
//Supporting thumbnails in WP: | |
if ( function_exists( 'add_theme_support' ) ) { | |
add_theme_support( 'post-thumbnails' ); | |
} | |
function childtheme_content($unfiltered) { //pass the original unfiltered content | |
if (is_home()){ // if this is the home page | |
?> | |
<a href="<?php the_permalink(); ?>"><?php //call the link to the post | |
if ( has_post_thumbnail() ) { // if the post has a Post Thumbnail | |
the_post_thumbnail(array(100,100)); //use it in 100px maximum | |
} else { | |
the_title(); //use the title of the post | |
} | |
?></a><?php //close the link | |
} else { //if it's not the homepage | |
echo $unfiltered; //forget about it, use the original content | |
} | |
} | |
add_filter('the_content','childtheme_content'); //filter the_content with our function | |
?> |
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
/* | |
Theme Name: Test-Drive | |
Theme URI: | |
Description: Use this theme to start your Thematic Child Theme development. | |
Author: Ian Stewart | |
Author URI: http://themeshaper.com/ | |
Template: thematic | |
Version: 1.0 | |
Tags: Thematic | |
. | |
Thematic is © Ian Stewart http://themeshaper.com/ | |
. | |
*/ | |
/* Reset browser defaults */ | |
@import url('../thematic/library/styles/reset.css'); | |
/* Apply basic typography styles */ | |
@import url('../thematic/library/styles/typography.css'); | |
/* Apply a basic layout */ | |
@import url('../thematic/library/layouts/2c-r-fixed.css'); | |
/* Apply basic image styles */ | |
@import url('../thematic/library/styles/images.css'); | |
/* Apply default theme styles and colors */ | |
/* It's better to actually copy over default.css into this file (or link to a copy in your child theme) if you're going to do anything outrageous */ | |
@import url('../thematic/library/styles/default.css'); | |
/* Prepare theme for plugins */ | |
@import url('../thematic/library/styles/plugins.css'); | |
body{ | |
/* background: #f00; */ | |
} | |
a:link{ | |
color: #f00; | |
} | |
.category-recommended-posts h2.entry-title{ | |
background: #eee; | |
} | |
.category-recommended-posts h2.entry-title a{ | |
color: #00F; | |
} | |
#blog-title a{ | |
background: url("assets/logo.png"); | |
display: block; | |
height: 70px; | |
text-indent: -99999px; | |
width: 280px; | |
} | |
#blog-title a:hover{ | |
background-position: 0 -70px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment