Last active
November 28, 2016 23:36
-
-
Save marisqaporter/ccd0f5202bc53b177dd803aeca1660ec to your computer and use it in GitHub Desktop.
testimonials for the shed builders
This file contains hidden or 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
| /*testimonials loop */ | |
| .site-1200 { | |
| margin:30px auto; | |
| display:block; | |
| position:relative; | |
| max-width:1140px; | |
| } | |
| .test-image { | |
| margin:20px; | |
| padding:20px; | |
| } | |
| .test-image img { | |
| border-radius:50%; | |
| } | |
| h4.testimonial { | |
| font-size: 40px; | |
| } | |
| .test-row { | |
| padding-top:0 !important; | |
| } | |
| .test-box { | |
| padding: 0 20px; | |
| } | |
| @media screen and (min-width:1024px) { | |
| .test-box { | |
| padding:0 20px; | |
| } | |
| .test-image { | |
| padding:0; | |
| } | |
| } |
This file contains hidden or 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 | |
| $args = array( | |
| 'post_type' => 'testimonial', // enter your custom post type | |
| ); | |
| $loop = new WP_Query( $args ); | |
| if( $loop->have_posts() ): | |
| echo '<div class="site-1200">'; | |
| echo '<h4 class="center testimonial">Testimonials</h4>'; | |
| echo '<div class="row test-row center-xs top-xs stretch-xs ">'; | |
| while( $loop->have_posts() ): $loop->the_post(); global $post; | |
| ?> | |
| <div class="col-xs-12 | |
| col-sm-12 | |
| col-md-12 | |
| col-lg-4"> | |
| <div class="box test-box"> | |
| <?php the_title( '<h4 class="center">', '</h4>' ); ?> | |
| <div class="test-image"><?php the_post_thumbnail('large'); ?></div> | |
| <span class="center copy"><?php the_content(); ?></span> | |
| </div> | |
| </div> | |
| <?php | |
| endwhile; | |
| echo '</div>'; // end site-1200 | |
| echo '</div>'; // end row | |
| endif; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment