Separate the testimonials into new partial file.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 25 Mar 2015 18:30:09 +0000 (14:30 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 25 Mar 2015 18:30:09 +0000 (14:30 -0400)
parts/testimanial.php

front-page.php
home.php
page.php
parts/testimonial.php [new file with mode: 0644]
search.php

index 2a299b9..8c14c3e 100644 (file)
@@ -4,7 +4,7 @@
         <?php get_template_part('parts/slide-show');?>
     </div>
     <div id="content-wrapper">
-         <div class="row">    
+         <div class="row">
             <div id="content-input" class="small-12 columns text-center">
                 <?php if(have_posts()) : while(have_posts()): the_post();?>
                 <?php the_content();?>
                 <?php endif;?>
             </div>
         </div>
-        <div id="testimonials" class="row">
-            <div class="small-12 columns overlay">
-                <?php echo do_shortcode('[testimonial_rotator id=520 hide_title="true"]'); ?>
-            </div>
-        </div>
+        <?php get_template_part('parts/testimonial');?>
         <div class="row">
             <div class="logos">
                 <ul class="small-block-grid-2 medium-block-grid-4">
index 669fe5d..ed53af7 100644 (file)
--- a/home.php
+++ b/home.php
@@ -1,59 +1,50 @@
 <?php get_header(); ?>
-                    <div class="main">
-                        <div id="testimonials" class="row">
-                            <div class="small-12 columns overlay">
-                                <?php echo do_shortcode('[testimonial_rotator id=520 hide_title="true"]'); ?>
-                            </div>
-                        </div>
-                        <div id="content-wrapper">
-                             <div class="row">
-                                <div id="searchform_container" class="small-12 medium-3 columns alignright">
-                                    <form id="searchform" action="<?php bloginfo('url'); ?>" method="get">
-                                        <div><input id="s" class="text" type="text" name="s" value="" />
-                                        <input class="submit button blogbutton" type="submit" name="submit" value="Search" />
-                                        <input type="hidden" name="searchType" value="blog" /> </div>
-                                    </form>
-                                </div>
-                                <div id="blog-posts-over" class="small-12 medium-9 columns">
-                                    <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
-                                    <div class="row" id="blog-posts-container">
-                                        <div class="small-11 small-centered columns">
-                                            <div class="row">
-                                                <div class="small-12 columns">
-                                                    <ul class="breadcrumbs">
-
-                                                    </ul>
-                                                </div>
-                                            </div>
-                                            <div class="row">
-                                                <div class="small-12 columns">
-
-                                                    <article id="<?php the_ID()?>" <?php post_class()?>>
-                                                        <header class="entry-header">
+    <div class="main">
+    <?php get_template_part('parts/testimonial');?>
+        <div id="content-wrapper">
+             <div class="row">
+                <div id="searchform_container" class="small-12 medium-3 columns alignright">
+                    <form id="searchform" action="<?php bloginfo('url'); ?>" method="get">
+                        <div><input id="s" class="text" type="text" name="s" value="" />
+                        <input class="submit button blogbutton" type="submit" name="submit" value="Search" />
+                        <input type="hidden" name="searchType" value="blog" /> </div>
+                    </form>
+                </div>
+                <div id="blog-posts-over" class="small-12 medium-9 columns">
+                    <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
+                    <div class="row" id="blog-posts-container">
+                        <div class="small-11 small-centered columns">
+                            <div class="row">
+                                <div class="small-12 columns">
+                                    <ul class="breadcrumbs">
 
-                                                            <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
-                                                            <span class="meta"> Posted on <strong><?php the_time('F jS, Y'); ?></strong> </span>
-
-
-                                                        </header>
-
-                                                        <?php echo the_advanced_excerpt('length=200&length_type=words&no_custom=1&ellipsis=%26hellip;'); ?>
-                                                        <hr>
-                                                    </article>
-                                                </div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                    <?php endwhile; ?>
-                                    <div class="navigation">
-                                        <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
-                                    </div><!-- /.navigation -->
-                                    <?php else: ?>
-                                    <div id="post-404" class="noposts">
-                                            <p><?php _e('Sorry, no posts yet');?></p>
-                                    </div><!-- /#post-404 -->
-                                    <?php endif;?>
+                                    </ul>
+                                </div>
+                            </div>
+                            <div class="row">
+                                <div class="small-12 columns">
+                                    <article id="<?php the_ID()?>" <?php post_class()?>>
+                                        <header class="entry-header">
+                                            <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
+                                            <span class="meta"> Posted on <strong><?php the_time('F jS, Y'); ?></strong> </span>
+                                        </header>
+                                        <?php echo the_advanced_excerpt('length=200&length_type=words&no_custom=1&ellipsis=%26hellip;'); ?>
+                                        <hr>
+                                    </article>
                                 </div>
                             </div>
                         </div>
-<?php get_footer(); ?>
\ No newline at end of file
+                    </div>
+                    <?php endwhile; ?>
+                    <div class="navigation">
+                        <span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
+                    </div><!-- /.navigation -->
+                    <?php else: ?>
+                    <div id="post-404" class="noposts">
+                            <p><?php _e('Sorry, no posts yet');?></p>
+                    </div><!-- /#post-404 -->
+                    <?php endif;?>
+                </div>
+            </div>
+        </div>
+<?php get_footer(); ?>
index 18aebc6..061a588 100644 (file)
--- a/page.php
+++ b/page.php
@@ -1,36 +1,30 @@
 <?php get_header(); ?>
-
-                <div class="main">
-                    <div id="testimonials" class="row">
-                        <div class="small-12 columns overlay">
-                            <?php echo do_shortcode('[testimonial_rotator id=520 hide_title="true"]'); ?>
-                        </div>
-                    </div>
-                    <div id="content-wrapper">
-                         <div class="row">
-                             <?php
-                             get_template_part('parts/bread-crumbs');
-                             ?>
-                         </div>
-                         <div class="row">
-                            <div id="main-content" class="small-12 medium-6 large-8 columns">
-                                    <?php if(have_posts()) : while(have_posts()): the_post();?>
-                                    <?php the_content();?>
-                                    <?php endwhile; else:?>
-                                    <p><?php _e('Sorry, no posts yet');?></p>
-                                    <?php endif;?>
-                            </div>
-                        </div>
-                        <div class="row">
-                            <div class="logos">
-                                <ul class="small-block-grid-2 medium-block-grid-4">
-                                    <li><img src="<?php echo get_template_directory_uri(); ?>/assets/NAHB.png"></li>
-                                    <li><img src="<?php echo get_template_directory_uri(); ?>/assets/HBA.png"></li>
-                                    <li><img src="<?php echo get_template_directory_uri(); ?>/assets/best-of.png"></li>
-                                    <li><img src="<?php echo get_template_directory_uri(); ?>/assets/builder-of-year.png"></li>
-                                </ul>
-                            </div>
-                        </div>
-                    </div>
-                    
+    <div class="main">
+    <?php get_template_part('parts/testimonial');?>
+        <div id="content-wrapper">
+             <div class="row">
+                 <?php
+                 get_template_part('parts/bread-crumbs');
+                 ?>
+             </div>
+             <div class="row">
+                <div id="main-content" class="small-12 medium-6 large-8 columns">
+                        <?php if(have_posts()) : while(have_posts()): the_post();?>
+                        <?php the_content();?>
+                        <?php endwhile; else:?>
+                        <p><?php _e('Sorry, no posts yet');?></p>
+                        <?php endif;?>
+                </div>
+            </div>
+            <div class="row">
+                <div class="logos">
+                    <ul class="small-block-grid-2 medium-block-grid-4">
+                        <li><img src="<?php echo get_template_directory_uri(); ?>/assets/NAHB.png"></li>
+                        <li><img src="<?php echo get_template_directory_uri(); ?>/assets/HBA.png"></li>
+                        <li><img src="<?php echo get_template_directory_uri(); ?>/assets/best-of.png"></li>
+                        <li><img src="<?php echo get_template_directory_uri(); ?>/assets/builder-of-year.png"></li>
+                    </ul>
+                </div>
+            </div>
+        </div>
 <?php get_footer(); ?>
diff --git a/parts/testimonial.php b/parts/testimonial.php
new file mode 100644 (file)
index 0000000..97d2426
--- /dev/null
@@ -0,0 +1,6 @@
+<div id="testimonials" class="row">
+    <div class="small-12 columns overlay">
+        <?php echo do_shortcode('[testimonial_rotator id=520 hide_title="true"]'); ?>
+        <?php echo do_shortcode('[testimonial_rotator id=18 hide_title="true"]'); ?>
+    </div>
+</div>
index bf06c70..b0e4ca8 100644 (file)
@@ -1,58 +1,50 @@
 <?php get_header(); ?>
     <div class="main">
-                    <div id="testimonials" class="row">
-                        <div class="small-12 columns overlay">
-                            <?php echo do_shortcode('[testimonial_rotator id=520 hide_title="true"]'); ?>
+        <?php get_template_part('parts/testimonial');?>
+        <div id="content-wrapper">
+            <div id="search_results_over">
+                <h2 class="search-result-header">Search Results for "<?php echo get_search_query(); ?>"</h2><br>
+                <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
+                <div class="" id="search_results_container" style="max-width:1000px;">
+                    <div class="row">
+                        <div class="small-12 columns">
+
+                            <article id="<?php the_ID()?>" <?php post_class()?>>
+                                <h5 class="">Page: <a href="<?php the_permalink(); ?>"><?php the_title();?></a></h5>
+                                <span class="meta"> Posted on <strong><?php the_time('F jS, Y'); ?></strong> </span>
+                                <?php //echo the_advanced_excerpt('length=30&length_type=words&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,strong,b,hr,br,div;'); ?>
+                                <?php the_excerpt(); ?>
+                                <footer class="entry-meta small-12 medium-6 medium-push-3 center">
+                                    <?php $post_categories = wp_get_post_categories( get_the_ID() );
+                                    $cats = array();
+                                    ?>
+                                </footer>
+                            </article>
                         </div>
                     </div>
-                    <div id="content-wrapper">
-                        
-    <div id="search_results_over">
-        <h2 class="search-result-header">Search Results for "<?php echo get_search_query(); ?>"</h2><br>
-        <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
-        <div class="" id="search_results_container" style="max-width:1000px;">
+                </div>
+                <?php endwhile; ?>
+                <?php if ( function_exists('FoundationPress_pagination') ) { FoundationPress_pagination(); } else if ( is_paged() ) { ?>
+                <nav id="post-nav">
+                    <div class="post-previous"><?php next_posts_link( __( '&larr; Older results', 'FoundationPress' ) ); ?></div>
+                    <div class="post-next"><?php previous_posts_link( __( 'Newer results &rarr;', 'FoundationPress' ) ); ?></div>
+                </nav>
+            <?php } ?>
+                <?php else: ?>
+                <div id="post-404" class="noposts">
+                        <p><?php _e('Sorry, no results were found.');?></p>
+                </div><!-- /#post-404 -->
+                <?php endif;?>
+            </div>
             <div class="row">
-                <div class="small-12 columns">
-
-                    <article id="<?php the_ID()?>" <?php post_class()?>>
-                        <h5 class="">Page: <a href="<?php the_permalink(); ?>"><?php the_title();?></a></h5>
-                        <span class="meta"> Posted on <strong><?php the_time('F jS, Y'); ?></strong> </span>
-                        <?php //echo the_advanced_excerpt('length=30&length_type=words&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,strong,b,hr,br,div;'); ?>
-                        <?php the_excerpt(); ?>
-                        <footer class="entry-meta small-12 medium-6 medium-push-3 center">
-
-                            <?php $post_categories = wp_get_post_categories( get_the_ID() );
-                            $cats = array();
-
-                            ?>
-
-                        </footer>
-                    </article>
+                <div class="logos">
+                    <ul class="small-block-grid-2 medium-block-grid-4">
+                        <li><img src="<?php echo get_template_directory_uri(); ?>/assets/NAHB.png"></li>
+                        <li><img src="<?php echo get_template_directory_uri(); ?>/assets/HBA.png"></li>
+                        <li><img src="<?php echo get_template_directory_uri(); ?>/assets/best-of.png"></li>
+                        <li><img src="<?php echo get_template_directory_uri(); ?>/assets/builder-of-year.png"></li>
+                    </ul>
                 </div>
             </div>
         </div>
-        <?php endwhile; ?>
-        <?php if ( function_exists('FoundationPress_pagination') ) { FoundationPress_pagination(); } else if ( is_paged() ) { ?>
-               <nav id="post-nav">
-                       <div class="post-previous"><?php next_posts_link( __( '&larr; Older results', 'FoundationPress' ) ); ?></div>
-                       <div class="post-next"><?php previous_posts_link( __( 'Newer results &rarr;', 'FoundationPress' ) ); ?></div>
-               </nav>
-       <?php } ?>
-        <?php else: ?>
-        <div id="post-404" class="noposts">
-                <p><?php _e('Sorry, no results were found.');?></p>
-        </div><!-- /#post-404 -->
-        <?php endif;?>
-    </div>
-                        <div class="row">
-                            <div class="logos">
-                                <ul class="small-block-grid-2 medium-block-grid-4">
-                                    <li><img src="<?php echo get_template_directory_uri(); ?>/assets/NAHB.png"></li>
-                                    <li><img src="<?php echo get_template_directory_uri(); ?>/assets/HBA.png"></li>
-                                    <li><img src="<?php echo get_template_directory_uri(); ?>/assets/best-of.png"></li>
-                                    <li><img src="<?php echo get_template_directory_uri(); ?>/assets/builder-of-year.png"></li>
-                                </ul>
-                            </div>
-                        </div>
-                    </div>
 <?php get_footer(); ?>