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 | |
/** | |
* List Posts tagged 'thesis-tip' | |
* | |
*/ | |
function be_display_thesis_tip() { | |
$args = array( | |
'tag' => 'thesis-tip', | |
'posts_per_page' => '-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
<?php | |
/** | |
* Don't show Events category on homepage | |
* Category 5 = Events category, so we use cat=-5 | |
* | |
* @link http://www.billerickson.net/thesis-wordpress-remove-category-homepage/ | |
* @author Bill Erickson | |
* @param object $query | |
*/ |
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
<script type='text/javascript' src='http://www.briangardner.com/js/backstretch.js'></script> | |
<script> | |
jQuery(document).ready(function($) { | |
$("body").backstretch(["http://www.briangardner.com/wp-content/uploads/bg.jpg"],{duration:3000,fade:750}); | |
}); | |
</script> |
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 post class to posts in the "Featured" category | |
add_filter('post_class', 'eo_custom_post_class'); | |
function eo_custom_post_class($classes) | |
{ | |
$new_class = 'featured-post'; | |
if (in_category('Featured')) | |
$classes[] = esc_attr(sanitize_html_class($new_class)); | |
return $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
<?php | |
/** | |
* Possibly amend the loop. | |
* | |
* Specify the conditions under which the grid loop should be used. | |
* | |
* @author Bill Erickson | |
* @author Gary Jones | |
* @link http://code.garyjones.co.uk/genesis-grid-loop-advanced/ |
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: Testimonial Archives | |
* Description: Used as a page template to show page contents, followed by a loop through a CPT archive | |
*/ | |
remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
add_action( 'genesis_loop', 'custom_do_loop' ); // Add custom loop |
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_content', 'wpsites_before_post_image' ); | |
function wpsites_before_post_image() { | |
if ( !is_page() ) return; | |
if ( $image = genesis_get_image( 'format=url&size=post-image' ) ) { | |
printf( '<a href="%s" rel="bookmark"><img class="post-photo" src="%s" alt="%s" /></a>', get_permalink(), $image, the_title_attribute( 'echo=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
<?php | |
/** | |
* Don't show Events category on homepage | |
* Category 5 = Events category, so we use cat=-5 | |
* | |
* @link http://www.billerickson.net/thesis-wordpress-remove-category-homepage/ | |
* @author Bill Erickson | |
* @param object $query | |
*/ |
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 | |
// Enqueue sticky menu script | |
add_action( 'wp_enqueue_scripts', 'custom_enqueue_script' ); | |
function custom_enqueue_script() { | |
wp_enqueue_script( 'sticky-menu', get_stylesheet_directory_uri() . '/js/sticky-menu.js', array( 'jquery' ), '', true ); | |
} | |
// Reposition the secondary navigation menu | |
remove_action( 'genesis_after_header', 'genesis_do_subnav' ); |
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 | |
add_action( 'genesis_before_loop', 'child_maybe_do_grid_loop' ); | |
function child_maybe_do_grid_loop() { | |
// Amend this conditional to pick where this grid looping occurs | |
if ( is_page('2') ) { | |
remove_action('genesis_before_post_content', 'genesis_post_info'); |
OlderNewer