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 featured image and link | |
$image = genesis_get_image( array( | |
'format' => 'html', | |
'size' => 'SET_SIZE_HERE', | |
) ); | |
printf( '<a href="%s" title="%s" >%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $image ); |
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_action ('genesis_before_entry','add_image_before_title'); | |
add_action ('genesis_before_post_title','add_image_before_title'); | |
function add_image_before_title(){ | |
if (is_category() && has_post_thumbnail()){ | |
//* Add featured image and link | |
$image = genesis_get_image( array( | |
'format' => 'html', | |
'size' => 'thumbnail', | |
'attr' => array('class'=>'alignleft') |
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_action('genesis_before_loop','remove_info'); | |
function remove_info(){ | |
if (in_category(ADD_CATEGORY_NUMBER_HERE)){ | |
//This removes the author, date, etc. at the top of the post | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); | |
//This removes the categories and tags at the bottom of the post | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
} | |
} |
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 the read more link text | |
add_filter('get_the_content_more_link', 'custom_read_more_link'); | |
add_filter('the_content_more_link', 'custom_read_more_link'); | |
function custom_read_more_link() { | |
return ' <a class="more-link" href="' . get_permalink() . '">Keep Reading …</a>'; | |
} |
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_image_size( 'featured-top', 750, 500, TRUE ); | |
add_action ('genesis_before_loop','add_top_image'); | |
function add_top_image(){ | |
if (is_page() || is_single()){ | |
the_post_thumbnail('featured-top',array('class'=>'top-of-post')); | |
} | |
} | |
// Use this one if it's full width and needs to be a background image |
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 jp_search_filter( $query ) { | |
if ( $query->is_search && $query->is_main_query() ) { | |
// unset certain pages | |
$query->set( 'post__not_in', array( 10,11,20,105 ) ); | |
// setup certain categories | |
$query->set('cat',array('stores')); | |
// setup certain post types | |
$query->set( 'post_type', array( 'post', 'movies', 'products', 'portfolio' ) ); | |
} | |
} |
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
jQuery(document).ready(function($) { | |
$("body").backstretch([BackStretchImg.src],{duration:3000,fade:750}); | |
}); |
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
/* *** Chrome and Safari */ | |
[placeholder]:focus::-webkit-input-placeholder { | |
transition: opacity 0.5s 0.5s ease; | |
opacity: 0; | |
} | |
/* *** Firefox */ | |
[placeholder]:focus::-moz-placeholder { | |
opacity: 0; | |
} |
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
// linear-gradient([direction], [stop] [% or px], <[stop] [% or px]>+) | |
// background: linear-gradient(left, rgba(255,0,0,0), red 50px, blue 100px, blue 200px, green ); | |
#linear-grad { | |
//top to bottom | |
background: -webkit-linear-gradient(red, blue); /* For Safari 5.1 to 6.0 */ | |
background: -o-linear-gradient(red, blue); /* For Opera 11.1 to 12.0 */ | |
background: -moz-linear-gradient(red, blue); /* For Firefox 3.6 to 15 */ | |
background: linear-gradient(red, blue); /* Standard syntax */ |
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 new_excerpt_more($more) { | |
return ''; | |
} | |
add_filter('excerpt_more', 'new_excerpt_more', 21 ); | |
function the_excerpt_more_link( $excerpt ){ | |
$post = get_post(); | |
$excerpt .= '<a href="'. get_permalink($post->ID) . '">continue reading</a>'; | |
return $excerpt; | |
} |