Modification to be_project_quote() function: http://www.billerickson.net/building-my-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
<?php | |
/** | |
* Project Quote | |
* | |
*/ | |
function be_project_quote() { | |
global $wp_query, $be_testimonials; | |
if( !( ( 5 < $wp_query->found_posts && 5 == $wp_query->current_post ) || ( $wp_query->current_post == ( $wp_query->found_posts - 1 ) && 5 > $wp_query->found_posts ) ) ) | |
return; | |
if( isset( $be_testimonials ) && !empty( $be_testimonials ) ) { | |
$testimonial = $be_testimonials[0]; | |
if( is_tax( 'type', 'mobile-design' ) && !empty( $be_testimonials[2] ) ) // added !empty to avoid error on taxonomy archive | |
$testimonial = $be_testimonials[2]; | |
if( is_tax( 'type', 'design-to-website' ) && !empty( $be_testimonials[1] ) ) // added !empty to avoid error on taxonomy archive | |
$testimonial = $be_testimonials[1]; | |
echo $testimonial; | |
} else { | |
echo '<div class="divider"></div>'; | |
} | |
} | |
?> | |
add_action( 'genesis_after_post', 'be_project_quote' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment