Archive template for categories and archives
authorLaury GvR <laury@gaslightmedia.com>
Fri, 1 May 2015 19:00:21 +0000 (15:00 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 1 May 2015 19:00:21 +0000 (15:00 -0400)
archive.php [new file with mode: 0644]

diff --git a/archive.php b/archive.php
new file mode 100644 (file)
index 0000000..acd9822
--- /dev/null
@@ -0,0 +1,73 @@
+<?php get_header(); ?>
+<div class="main">
+    <div id="content-wrapper">
+         <div class="row">
+            <?php
+            echo "<div class=\"breadcrumbs\">";
+            bcn_display();
+            echo "</div>";
+            echo '<div class="separator"><hr></div>';
+            ?>
+         </div>
+         <div class="row">
+            <div id="main-content" class="small-12 large-8 columns">
+                <div id="blog-posts-over" class="small-12 columns">
+                    <?php if(have_posts()): $i = 1; while (have_posts() && $i < 6) : the_post(); ?>
+                    <div class="row blog-posts-container">
+                        <div class="small-11 small-centered columns">
+                            <div class="row">
+                                <div class="small-12 columns content">
+
+                                    <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>
+                                        </header>
+                                        <p class="date"><?php the_time('F jS, Y h:iA'); ?> </p>
+                                        <?php echo the_advanced_excerpt('length=50&length_type=words&no_custom=1&ellipsis=%26hellip;'); ?>
+                                    </article>
+                                </div>
+                            </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>
+            </div>
+            <div class="small-12 large-4 columns small-text-center medium-text-left">
+                <?php get_sidebar(); ?>
+                <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>
+            </div>
+        </div>
+    </div>
+<?php get_footer(); ?>