Sidebar hopefully removed on request brochures page.
authorLaury GvR <laury@gaslightmedia.com>
Wed, 8 Jul 2015 19:08:32 +0000 (15:08 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 8 Jul 2015 19:10:10 +0000 (15:10 -0400)
front-page.php
page-1257.php [new file with mode: 0644]
page.php
parts/blog-feed.php [new file with mode: 0644]
parts/right-sidebar.php
scss/_structure.scss

index 0931432..1ec686e 100644 (file)
@@ -22,7 +22,7 @@
                             <?php } ?>
                             <h3 class="title-posts" href="<?php the_permalink(); ?>"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
 
-<!--                            <p id="date" class="italic"><?php echo get_the_date('D, F j, Y g:iA', $post->ID); ?></p>-->
+<!--                            <p id="date" class="italic"><?php // echo get_the_date('D, F j, Y g:iA', $post->ID); ?></p>-->
 
                             <div><?php echo the_advanced_excerpt('length=95&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=a,img,p,strong,h1,h2,h3,hr,div'); ?></div>
                         </div>
                     get_template_part('parts/glm-blocks');
                     ?>
                 </div>
+                <div id="blog-feed" class="small-12 columns">
+                    <?php get_template_part("parts/blog-feed");?>
+                </div>
 <!--
                 <div id="video" class="small-12 columns">
                     <div class="row">
                         <div class="small-12 small-text-center large-text-uncenter large-3 columns">
-                            <img src="<?php echo get_template_directory_uri(); ?>/assets/video.jpg">
+                            <img src="<?php // echo get_template_directory_uri(); ?>/assets/video.jpg">
                         </div>
                         <div class="small-8 small-centered small-text-center large-text-left large-9 columns">
                             <h2>Emmet County Videos</h2>
diff --git a/page-1257.php b/page-1257.php
new file mode 100644 (file)
index 0000000..b405073
--- /dev/null
@@ -0,0 +1,56 @@
+<?php get_header(); ?>
+                <main>
+                    <div class="row" data-equalizer>
+                        <?php get_sidebar(); ?>
+                        <div id="content-bulk" class="small-12 large-9 columns" data-equalizer-watch>
+                            <div id="con" class="row">
+                                <div class="small-12 columns">
+                                    <?php
+                                    get_template_part('parts/bread-crumbs');
+                                    ?>
+                                    <?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>
+                                        <?php
+                            $args = array( 'numberposts' => 3,'category'=>'sheriff-department');
+                            $lastposts = get_posts( $args );
+                            foreach($lastposts as $post) : setup_postdata($post); ?>
+                                <div class="home-feed-post">
+
+                                    <div class="row">
+                                        <?php if (has_post_thumbnail( $post->ID )) { ?> 
+                                        <div class="small-8 small-centered medium-3 medium-uncentered columns home-feed-post-image">
+                                            <?php echo get_the_post_thumbnail($post->ID, array(190, 190), array('class' => 'blog-excerpt-img-wrap')); ?>
+                                            </div>
+                                            <div class="small-12 medium-9 columns home-feed-post-content">
+                                             <?php } else { ?>
+                                            <div class="small-12 columns home-feed-post-content">
+                                            <?php } ?>
+                                            <h3 class="title-posts" href="<?php the_permalink(); ?>"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
+
+                <!--                            <p id="date" class="italic"><?php // echo get_the_date('D, F j, Y g:iA', $post->ID); ?></p>-->
+
+                                            <div><?php echo the_advanced_excerpt('length=95&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=a,img,p,strong,h1,h2,h3,hr,div'); ?></div>
+                                        </div>
+                                    </div>
+                                </div>
+                            <?php endforeach; ?>
+                            <footer>
+                                <div class="small-12 small-text-center columns">
+                                    <img src="<?php echo get_template_directory_uri(); ?>/assets/slogan.png">
+                                </div>
+                                <div class="address medium-offset-3 medium-9 show-for-medium-up columns">
+                                    <img class="left" src="<?php echo get_template_directory_uri(); ?>/assets/seal.png">
+                                    <p>Emmet County, Michigan<br>200 Division Street, Petoskey, MI 49770<br>231-348-1702 | <a href="#">Contact Us</a></p>
+                                </div>
+                            </footer>
+                        </div>
+                        <?php if (get_the_block( 'sidebar' ) != "" && $name != "request-brochures") {
+                            get_template_part('parts/right-sidebar');
+                        } ?>
+                    </div>
+<?php get_footer(); ?>
index 57477d0..0fb9461 100644 (file)
--- a/page.php
+++ b/page.php
@@ -2,7 +2,7 @@
                 <main>
                     <div class="row" data-equalizer>
                         <?php get_sidebar(); ?>
-                        <?php if (get_the_block( $name, $args ) != "") { ?>
+                        <?php if (get_the_block( 'sidebar' ) != "" && $name != "request-brochures" && $name != "contact-us") { ?>
                         <div id="content-bulk" class="small-12 large-6 columns" data-equalizer-watch>
                         <?php } else { ?>
                         <div id="content-bulk" class="small-12 large-9 columns" data-equalizer-watch>
@@ -29,7 +29,7 @@
                                 </div>
                             </footer>
                         </div>
-                        <?php if (get_the_block( $name, $args ) != "") {
+                        <?php if (get_the_block( 'sidebar' ) != "" && $name != "request-brochures" && $name != "contact-us") {
                             get_template_part('parts/right-sidebar');
                         } ?>
                     </div>
diff --git a/parts/blog-feed.php b/parts/blog-feed.php
new file mode 100644 (file)
index 0000000..53bcf61
--- /dev/null
@@ -0,0 +1,29 @@
+    <?php
+    $args = array('numberposts' => 3, 'order_by' => 'date');
+    $lastposts = get_posts( $args );
+    if ($lastposts) { ?>
+
+            <div class="content-wrapper">
+                <div class="row wordpress-content">
+                <h1>Recent News</h1>
+                <?php foreach($lastposts as $post) : setup_postdata($post); ?>
+                    <div class="small-12 columns blog-feed-post">
+                        <?php $thumbnail = get_the_post_thumbnail($post->ID, array(130, 130)); ?>
+                        <?php if ($thumbnail) { ?>
+                            <div class="small-3 columns blog-feed-image">
+                                    <?php echo $thumbnail; ?>
+                            </div>
+                            <div class="small-9 columns blog-feed-text">
+                        <?php } else { ?>
+                            <div class="small-12 columns blog-feed-text">
+                        <?php } ?>
+                        <h2><a class="read" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
+                        <p id="date" class="italic"><?php echo get_the_date('D, F j, Y g:iA', $post->ID); ?></p>
+                        
+                        <p><?php echo the_advanced_excerpt('length=200&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,p,strong'); ?></p>
+                        </div>
+                    </div>
+                <?php endforeach; ?>
+                </div>
+            </div>
+    <?php } ?>
\ No newline at end of file
index aa3cae8..2218182 100644 (file)
@@ -1,8 +1,8 @@
 <div id="extra" class="large-3 columns show-for-large-up">
 <?php 
-echo get_the_block( $name, array(
-    'label'         => __( '<h2>Enter your Sidebar content here. Leave this blank '
-            . 'to remove the sidebar area once more<h2>', 'text-domain' ),
+echo get_the_block( 'sidebar', array(
+    'label'         => __( '<h2>Enter your Sidebar content here. Leave this area'
+            . 'blank to remove the sidebar area.<h2>', 'text-domain' ),
     'type'          => 'editor',
     'apply_filters' => true,
 ) );
index 01fa91e..2a76b67 100644 (file)
@@ -47,6 +47,7 @@ header {
             #search-button {
                 width: 26px;
                 right: 0px;
+                top: 0px;
                 position: absolute;
                 padding: 0;
                 color: white;
@@ -609,6 +610,9 @@ input[type="submit"].blogbutton {
         color:  white;
     }
 }
+.blog-feed-post {
+    margin-bottom: 20px;
+}
 #blog-posts-over article {
     padding-top: 10px;
     margin-bottom: 15px;