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> |
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: As a result, we only stick the site's wp-content in the repo | |
# | |
# See the comments below for more info on how to add exceptions for your | |
# content. Or see git's documentation for more info on .gitignore files: | |
# http://kernel.org/pub/software/scm/git/docs/gitignore.html |
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
/** | |
* Custom admin login header logo | |
*/ | |
function jr_custom_login_logo() { | |
echo '<style type="text/css">'. | |
'h1 a { background-size: 201px 35px !important; background-image:url('.get_bloginfo( 'template_directory' ).'/images/logo.png) !important; }'. | |
'</style>'; | |
} | |
add_action( 'login_head', 'jr_custom_login_logo' ); |
OlderNewer