Content checks for sidebar to get large-9
authorLaury GvR <laury@gaslightmedia.com>
Fri, 16 Dec 2016 15:07:01 +0000 (10:07 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 16 Dec 2016 15:07:01 +0000 (10:07 -0500)
The main content area would display 12 cols even if there was a
sidebar. Now it checks for the sidebar template to display large-9

parts/main-content.php

index 5a9ccd0..1ab0363 100644 (file)
@@ -1,7 +1,11 @@
-            <div id="main-content" class="small-12 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>
\ No newline at end of file
+<?php if ( get_page_template_slug( $post->ID ) === "side-bar" ) { ?>
+    <div id="main-content" class="small-9 columns">
+<?php } else { ?>
+    <div id="main-content" class="small-12 columns">    
+<?php } ?>
+        <?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>
\ No newline at end of file