Update blog pages
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 2 Apr 2015 15:52:07 +0000 (11:52 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 2 Apr 2015 15:52:07 +0000 (11:52 -0400)
Put div wrapper around the entire blog part giving it small-11 centered.
Create partial php file for the blog side area.

home.php
parts/blog-side.php [new file with mode: 0644]
single.php

index afd0172..4953c8f 100644 (file)
--- a/home.php
+++ b/home.php
@@ -1,42 +1,43 @@
 <?php get_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 blog-posts-container">
-                        <div class="small-12 small-centered columns content">
-                            <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;'); ?>
-                                    </article>
-                                </div>
+        <div id="content-wrapper" class="row">
+            <div class="row">
+                <div class="small-11 small-centered columns">
+                    <div class="row">
+            <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 blog-posts-container">
+                    <div class="small-12 small-centered columns content">
+                        <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=50&length_type=words&no_custom=1&ellipsis=%26hellip;'); ?>
+                                </article>
                             </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;?>
                 </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 class="small-12 medium-3 columns">
+                <?php get_template_part('parts/blog-side');?>
             </div>
+            <?php get_template_part('parts/logos');?>
         </div>
+                    </div>
+                </div>
+            </div>
 <?php get_footer(); ?>
diff --git a/parts/blog-side.php b/parts/blog-side.php
new file mode 100644 (file)
index 0000000..041d91d
--- /dev/null
@@ -0,0 +1,31 @@
+<div id="blog-side-info">
+    <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>
+    <p>Recent Posts</p>
+    <ul>
+        <?php
+        $args = array( 'numberposts' => '5' );
+        $recent_posts = wp_get_recent_posts( $args );
+        foreach( $recent_posts as $recent ){
+                echo '<li><a href="' . get_permalink($recent["ID"]) . '">' .   $recent["post_title"].'</a> </li> ';
+        }
+        ?>
+    </ul>
+    <p>Archive</p>
+    <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul>
+    <p>Categories</p>
+    <ul>
+        <?php
+        $args = array(
+        'orderby' => 'name',
+        'order' => 'ASC'
+        );
+      $categories = get_categories($args);
+        foreach($categories as $category) {
+          echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';  }
+        ?>
+    </ul>
+</div>
index bd8c4d0..93f5e62 100644 (file)
@@ -6,6 +6,9 @@
         </div>
     </div>
     <div id="content-wrapper" class="row">
+            <div class="row">
+                <div class="small-11 small-centered columns">
+                    <div class="row">
         <div id="blog-posts-over" class="small-12 medium-9 columns">
             <?php if(have_posts()) : while(have_posts()): the_post();?>
             <div class="row content" id="blog-posts-container">
             <?php endif;?>
         </div>
         <div class="small-12 medium-3 columns">
-            <div id="blog-side-info">
-                <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>
-                <p>Recent Posts</p>
-                <ul>
-                <?php
-                        $args = array( 'numberposts' => '5' );
-                        $recent_posts = wp_get_recent_posts( $args );
-                        foreach( $recent_posts as $recent ){
-                                echo '<li><a href="' . get_permalink($recent["ID"]) . '">' .   $recent["post_title"].'</a> </li> ';
-                        }
-                ?>
-                </ul>
-                <p>Archive</p>
-                <ul><?php wp_get_archives( array( 'type' => 'monthly', 'limit' => 12 ) ); ?></ul>
-                <p>Categories</p>
-                <ul>
-                    <?php
-                    $args = array(
-                    'orderby' => 'name',
-                    'order' => 'ASC'
-                    );
-                  $categories = get_categories($args);
-                    foreach($categories as $category) {
-                      echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';  }
-                    ?>
-                </ul>
-            </div>
+            <?php get_template_part('parts/blog-side');?>
         </div>
         <?php get_template_part('parts/logos');?>
     </div>
+                    </div>
+                </div>
+            </div>
 <?php get_footer(); ?>