Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: Testimonial Archives
- * Description: Testimonial Rotator Plugin custom archive page for Genesis Framework.
- */
- remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop
- add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop
- function custom_do_grid_loop() {
- // Intro Text (from page content)
- echo '<div class="page hentry entry">';
- echo '<h1 class="entry-title" >'. get_the_title() .'</h1>';
- echo '<div class="entry-content">' . get_the_content() ;
- $args = array(
- 'post_type' => 'testimonial',
- 'orderby' => 'menu_order',
- 'order' => 'ASC',
- 'posts_per_page'=> '20',
- );
- $loop = new WP_Query( $args );
- if( $loop->have_posts() ):
- while( $loop->have_posts() ): $loop->the_post(); global $post;
- echo '<div class="wcr-review" itemscope itemtype="http://schema.org/Review">';
- echo '<span style="display:none" itemprop="itemReviewed" itemscope itemtype="http://schema.org/YOURSCHEMAHERE"> <span itemprop="name">WHAT IS BEING REVIEWED HERE</span></span>';
- if (has_post_thumbnail()){
- echo '<div itemprop="image">' . get_the_post_thumbnail( $id, array(150,150) ).'</div>';}
- echo '<blockquote itemprop="reviewBody">' . get_the_content() . '</blockquote>';
- echo '<div class="bq-author">
- <div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"><span style="display:none;"itemprop="ratingValue" >5</span>
- <div class="testimonial_rotator_stars cf-tr">
- <span class="testimonial_rotator_star testimonial_rotator_star_1"><i class="fa fa-star"></i></span>
- <span class="testimonial_rotator_star testimonial_rotator_star_2"><i class="fa fa-star"></i></span>
- <span class="testimonial_rotator_star testimonial_rotator_star_3"><i class="fa fa-star"></i></span>
- <span class="testimonial_rotator_star testimonial_rotator_star_4"><i class="fa fa-star"></i></span>
- <span class="testimonial_rotator_star testimonial_rotator_star_5"><i class="fa fa-star"></i></span>
- </div>
- </div>';
- echo '<h3 itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">' . get_the_title() . '</span></h3></div>';
- echo '</div>';
- endwhile;
- endif;
- // Outro Text (hard coded)
- echo '</div><!-- end .entry-content -->';
- echo '</div><!-- end .page .hentry .entry -->';
- }
- /** Remove Post Info */
- remove_action('genesis_before_post_content','genesis_post_info');
- remove_action('genesis_after_post_content','genesis_post_meta');
- genesis();
RAW Paste Data