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: <theme name> | |
Theme URI: http://rezzz.com | |
Author: Jason Resnick | |
Author URI: http://rezzz.com/jason-resnick/ | |
Description: A Child theme off of <parent theme> built for the <name of> website | |
Version: 1.0 | |
Template: <parent theme directory name> | |
Text Domain: <name of>-child | |
*/ |
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 | |
/* <name of> child theme */ | |
// Faster than @import | |
add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts' ); | |
function my_child_theme_scripts() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
} |
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
// Edit term page | |
function summit_taxonomy_edit_meta_field($term) { | |
// put the term ID into a variable | |
$t_id = $term->term_id; | |
// retrieve the existing value(s) for this meta field. This returns an array | |
$term_meta = get_option( "taxonomy_$t_id" ); ?> | |
<tr class="form-field"> | |
<th scope="row" valign="top"><label for="term_meta[displayed]"><?php _e( 'Display Category', 'summit' ); ?></label></th> |
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 term page | |
function summit_taxonomy_add_new_meta_field() { | |
// this will add the custom meta field to the add new term page | |
?> | |
<div class="form-field"> | |
<label for="term_meta[displayed]"><?php _e( 'Display Category', 'summit' ); ?></label> | |
<input type="hidden" name="term_meta[helpme]" value="z"> | |
<input type="checkbox" name="term_meta[displayed]" id="term_meta[displayed]" value="1"> | |
<p class="description"><?php _e( 'Check to have the Category to displayed on the Sales Page','summit' ); ?></p> | |
</div> |
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
http://chart.apis.google.com/chart?chtt=&chxl=0:|Jan%202013&chxr=0,0,5|1,0,5&chxs=0,676767,11.5,0,lt,676767&chxt=x,y&chs=280x120&cht=lc&chco=3D7930&chm=B,C5D4B5BB,0,0,0&chf=bg,s,FFFFFF&chd=t:4&chds=0,5&chls=2,4,0&chg=-1,-1,1,1 |
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 jr_limit_content($limit, $thecontent = "") { | |
if ($thecontent) { | |
$content = explode(' ', $thecontent, $limit); | |
} | |
else { | |
$content = explode(' ', get_the_content(), $limit); | |
} | |
if (count($content)>=$limit) { | |
array_pop($content); | |
$content = implode(" ",$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 | |
// Check if this is a post or page, if it has a thumbnail, and if it's a big one | |
if ( is_singular() && has_post_thumbnail( $post->ID ) ) : | |
// Houston, we have a new header image! | |
echo get_the_post_thumbnail( $post->ID, 'full' ); | |
endif; | |
?> |
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
if ( is_active_sidebar( 'homepage-widget-area' ) ) : | |
dynamic_sidebar( 'homepage-widget-area' ); | |
endif; |
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 jr_widgets_init () | |
{ | |
if ( function_exists('register_sidebar') ) | |
register_sidebar( array( | |
'name' => __( 'Homepage Footer Area', 'twentyten' ), | |
'id' => 'homepage-widget-area', | |
'description' => __( 'Homepage Footer Area', 'twentyten' ), | |
'before_widget' => '<div id="%1$s" class="span4 widget-container %2$s">', | |
'after_widget' => '<div class="clear"></div></div>', | |
'before_title' => '<h3 class="jr-title widget-title">', |
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
/* Disable the Admin Bar & Setting in Profile. */ | |
add_filter( 'show_admin_bar', '__return_false' ); | |
function jr_hide_admin_bar_settings() { | |
?> | |
<style type="text/css"> | |
.show-admin-bar { | |
display: none; | |
} | |
</style> |
OlderNewer