updating blog develop
authorIan Weller <ian@gaslightmedia.com>
Tue, 25 Oct 2016 20:04:43 +0000 (16:04 -0400)
committerIan Weller <ian@gaslightmedia.com>
Tue, 25 Oct 2016 20:04:43 +0000 (16:04 -0400)
I updated some of the blog code to keep things consistant.

archive.php
home.php
single.php

index de96ac4..f8ed44e 100644 (file)
@@ -2,44 +2,42 @@
 <main class="blog-archive">
     <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 blog-posts-container">
+        <?php if(have_posts()) : while(have_posts()): the_post();?>
+        <?php $status =  get_post_status($post->ID); ?>
+        <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) { ?>
+              <?php 
+                    if (has_post_thumbnail()) {
+                        $thumbnail = get_the_post_thumbnail($post->ID, 'blog-feed-front'); ?>
                 <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  echo '<div class="small-12 medium-8 small-centered columns right">';
+                    } else {
+                        echo '<div class="small-12 small-centered columns">';
+                    }
+                ?>
+                <article id="<?php the_ID()?>" <?php post_class()?>>
+                    <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
+                    <div class="blog-excerpt-date">
+                        Posted on <strong><?php the_time('F jS, Y'); ?></strong>
+                    </div>
+                    <?php echo the_advanced_excerpt('length=265&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=a,img,p,strong,h1,h2,h3,hr,div'); ?>
+                </article>
 
-                        <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>
             </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 results were found.');?></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 results were found.');?></p>
+        </div><!-- /#post-404 -->
+        <?php endif;?>
+    </div>
         <?php get_template_part('parts/blog-sidebar-r'); ?>
     </div>
     <?php get_footer(); ?>
index 1929d0f..1ded112 100644 (file)
--- a/home.php
+++ b/home.php
@@ -6,43 +6,42 @@
     <div class="row">
         <div id="blog-posts-over" class="small-12 medium-9 columns">
             <?php if(have_posts()) : while(have_posts()): the_post();?>
+            <?php $status =  get_post_status($post->ID); ?>
             <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) { ?>
+                <?php 
+                    if (has_post_thumbnail()) {
+                        $thumbnail = get_the_post_thumbnail($post->ID, 'blog-feed-front'); ?>
                 <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 } ?>
-
-                        <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>
+                <?php  echo '<div class="small-12 medium-8 small-centered columns right">';
+                    } else {
+                        echo '<div class="small-12 small-centered columns">';
+                    }
+                ?>
+                <article id="<?php the_ID()?>" <?php post_class()?>>
+                    <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
+                    <div class="blog-excerpt-date">
+                        Posted on <strong><?php the_time('F jS, Y'); ?></strong>
+                    </div>
+                    <?php echo the_advanced_excerpt('length=265&length_type=characters&no_custom=1&ellipsis=%26hellip;&exclude_tags=a,img,p,strong,h1,h2,h3,hr,div'); ?>
+                    <!--                    <hr class="contentBreak">-->
+                </article>
             </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 results were found.');?></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 results were found.');?></p>
+        </div>
+        <!-- /#post-404 -->
+        <?php endif;?>
+    </div>
         <?php get_template_part('parts/blog-sidebar-r'); ?>
     </div>
     <?php get_footer(); ?>
index edf0add..b389f74 100644 (file)
@@ -9,17 +9,29 @@
                         <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>
+                                    <h2 class="entry-title single-title"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
                                     <?php if ( has_post_thumbnail() ):?>
                                              <?php if (get_post_type( $post ) != "ai1ec_event") { ?>
-                                    <div class="featured-image-wrap"><?php the_post_thumbnail("large"); ?></div>
+                                        <div class="featured-image-wrap"><?php the_post_thumbnail("large"); ?></div>
                                     <?php } ?>
                                     <?php endif; ?>
                                     <span class="meta date">Posted on <?php the_time('F jS, Y') ?></span>
+                                    <div id="addthis_wrapper">
+                                    <!-- AddThis Button BEGIN -->
+                                    <div class="addthis_toolbox addthis_default_style ">
+                                        <a class="addthis_counter addthis_pill_style"></a>
+                                    </div>
+                                    <script type="text/javascript">var addthis_config = {"data_track_addressbar":false};</script>
+                                    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5135fe4558d287a9"></script>
+                                    <!--                                        <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>-->
+                                    <!-- AddThis Button END -->
+                                    </div><!--/#addthis_wrapper-->
                                 </header>
                                 <?php echo the_content(); ?>
+                                <?php if (!is_post_type("ai1ec_event")) { ?>
+                                
+                                <?php } ?>
                             </article>
-                            <?php echo '<span class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'"></span>'; ?>
                             <?php if ( comments_open() || get_comments_number() ) :
                             comments_template();
                             endif; ?>