Skip to content

Instantly share code, notes, and snippets.

@robneu
Last active August 18, 2016 08:34
Show Gist options
  • Save robneu/5496621 to your computer and use it in GitHub Desktop.
Save robneu/5496621 to your computer and use it in GitHub Desktop.
Testimonials by Woo - Archive Template for Genesis
<?php
/**
* The custom testimonials post type archive template
*
* @since 1.0.0
*
* @author FAT Media <[email protected]>
* @package Genesis
*
* @copyright Copyright (c) 2012, FAT Media
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/
/** Force full width content layout */
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
/**
* Displays a custom header.
*
* @since 1.0.0
*/
add_action('genesis_after_header', 'bigfat_testimonial_header');
function bigfat_testimonial_header() {
$testimonial_title = 'Our Clients Say We\'re Awesome';
$testimonial_subtitle = 'Probably Because We Are';
echo '<div class="services-title">';
echo '<h1>' . esc_html( $testimonial_title ) . '<span> ' . esc_html( $testimonial_subtitle ) . ' </span></h1>';
echo '</div>';
}
/**
* Displays the Testimonials loop.
*
* @since 1.0.0
*
* @package Testimonials by Woo
*/
remove_action('genesis_loop', 'genesis_do_loop');
add_action('genesis_loop', 'bigfat_testimonial_do_loop');
function bigfat_testimonial_do_loop() {
$args = array(
'limit' => 10,
'orderby' => 'date',
'order' => 'DESC'
);
do_action( 'woothemes_testimonials', $args );
}
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment