styled archive, added glm_header to pages
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 15 Feb 2016 14:29:35 +0000 (09:29 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 15 Feb 2016 14:29:35 +0000 (09:29 -0500)
archive.php
css/app.css
functions.php
home.php
scss/_blog.scss
search.php
single.php

index bdeeeec..fbcab25 100644 (file)
@@ -1,31 +1,47 @@
 <?php get_header(); ?>
+   <?php glm_get_header(); ?>
     <div class="row">
+       <p>Categories</p>
+                    <div id="category-menu">
+                            <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>
         <div id="blog-posts-over" class="small-12 medium-9 columns">
-            <?php if(have_posts()) : while(have_posts()): the_post();?>
+            <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
             <div class="row content blog-posts-container">
               <!--  <div class="small-11 small-centered columns"> -->
-                <?php $thumbnail = get_the_post_thumbnail($post->ID, 'blog-feed-front'); ?>
-                <?php if ($thumbnail) { ?>
-                <div class="small-12 medium-4 columns text-center blog-feed-imgs">
-                    <?php echo $thumbnail; ?>
-                </div>
-                <div class="small-12 medium-8 columns blog-feed-contents">
-                    <?php } else { ?>
-                    <div class="small-12 columns blog-feed-content">
-                        <?php } ?>
+                  <?php
+                                        if (has_post_thumbnail()) {
+                                                $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "full");
+                                               echo '<a href="'.get_the_permalink().'" class="blog-featured-archive small-12 medium-6" style="background-image:url('.$image_data[0].');"></a>';
+                                               
+                                               echo '<div class="small-12 medium-6 small-centered columns right">';
+                                        } else {
+                                            echo '<div class="small-12 small-centered columns">';
+                                        }
+                                    ?>
 
-                        <article id="<?php the_ID()?>" <?php post_class()?>>
-          
-                        <header class="entry-header">
-                            <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h1>
-                            <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
-                        </header>
-                        <?php echo (function_exists('the_advanced_excerpt')) ? the_advanced_excerpt(): the_excerpt(); ?>
-                        <!--the_advanced_excerpt('length=200&length_type=words&no_custom=1&ellipsis=%26hellip;');-->
-                        <!-- This could be wrapped in php tags and be functional,
-                                but it is easier to change this in admin side-->
-                        
-                    </article>
+                       <div class="row">
+                                        <div class="small-12 columns">
+                                            <article id="<?php the_ID()?>" <?php post_class()?>>
+                                                <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
+                                                <?php echo the_advanced_excerpt(); ?>
+                                                <hr>
+                                                <div class="blog-excerpt-date">
+                                                    Posted on <strong><?php the_time('F jS, Y'); ?></strong>
+                                                </div>
+                                            </article>
+                                        </div>
+                                    </div>
                 </div>
             </div>
             <?php endwhile; ?>
index c62201e..905a51d 100644 (file)
@@ -7055,7 +7055,7 @@ input[type="submit"].blogbutton {
   background-repeat: no-repeat;
   background-position: center; }
 
-.blog-featured-home {
+.blog-featured-home, .blog-featured-archive {
   height: 250px;
   float: left;
   background-size: cover;
index 85c3be1..e476072 100644 (file)
@@ -93,7 +93,7 @@ function glm_site_scripts()
 function glm_get_header() {
     echo '<div';
 
-    if (has_post_thumbnail()) {
+    if (has_post_thumbnail()  && (!(is_home()) ) && (!(is_single())) && (!(is_archive())) && (!(is_search()))) {
             $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
             echo ' style="background-image: url('.$image_data[0].');height:300px;padding:0;padding-bottom:300px;background-position:center center;background-size: 100% 100%;background-repeat:no-repeat;max-height: 300px; "';
     } else {
index a0e9de1..fb9d641 100644 (file)
--- a/home.php
+++ b/home.php
@@ -1,8 +1,8 @@
 <?php get_header(); ?>
 <main class="blog-home">
 <!--    <article <?php // post_class() ?> id="interior-featured">
-        <?php // GLM_get_header(); ?>
     </article> -->
+    <?php glm_get_header(); ?>
     <div class="row">
        <?php get_template_part('parts/blog-sidebar-r'); ?>
        <p class="categoryLinksHeader">Categories</p>
index 9bb4aca..1afa33b 100644 (file)
@@ -163,7 +163,7 @@ input[type="submit"].blogbutton {
     background-repeat: no-repeat;
     background-position: center;
 }
-.blog-featured-home{
+.blog-featured-home, .blog-featured-archive{
     height: 250px;
     float: left;
     background-size: cover;
index 61a5380..15d8693 100644 (file)
@@ -1,4 +1,5 @@
 <?php get_header(); ?>
+<?php glm_get_header(); ?>
 <main class="search-results">
     <div class="row">
         <?php if (get_search_query() == "") { ?>
index 87bb0f3..f1cfd54 100644 (file)
@@ -50,7 +50,7 @@
                                             $cats[] = array( 'name' => $cat->name, 'slug' => $cat->slug );
                                             echo '<a rel="category" title="View all posts in '. $cat->name . ' " href="'. $cat->slug .'"> '. $cat->name .'</a>,';
                                         }
-                                    }    
+                                    }
                                     echo ' on<b> ';
                                     echo ' <span class="meta date">' . the_time('F jS, Y') . '</span>';
                                     echo '.</b>';