123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php get_header(); ?>
- <?php get_template_part( 'underscore' ); ?>
- <div class="container">
- <div id="content" role="main">
- <div class="entry-content archive-page">
- <div class="row">
- <?php if ( have_posts() ) : ?>
- <header class="page-header">
- <h1 class="super cm-sans wow fadeInRight"><?php the_time('Y'); ?></h1>
- </header>
- </div>
- <div class="row">
- <?php while ( have_posts() ) : the_post();?>
- <div class="col-sm-6">
- <div class="archive-thumbnail">
- <?php if ( has_post_thumbnail() ) : ?>
- <?php $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'medium'); ?>
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img class="archive-thumb" src="<?php echo $img_url[0];?>" width="100%" alt="<?php the_title(); ?>"/></a>
- <?php else: ?>
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><img class="archive-thumb" src="<?php echo get_template_directory_uri(); ?>/img/no-image.png" width="100%" alt="<?php the_title(); ?>"/></a>
- <?php endif; ?>
- </div>
- <article class="archive-card">
- <div class="entry-content">
- <h4><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( '%s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
- <?php dw_good_excerpt(210); ?>
- </div>
- </article>
- </div>
- <?php endwhile;
- dw_paging_nav();
- else :
- printf( __( 'Nothing Found', 'dw' ));
- get_search_form();
- endif;
- ?>
- </div>
- <div class="clear"> </div>
- <div class="row">
- <div class="col-md-12">
- <div id="nav-below" class="navigation">
- <?php $archive_year = get_the_date('U');
- $old_archive = date("Y",strtotime('-1 year', $archive_year));
- $new_archive = date("Y",strtotime('+1 year', $archive_year));
- ?>
- <div class="nav-previous">
- ← <a href="<?php echo get_year_link( $old_archive ); ?>"><?php echo $old_archive ?></a>
- </div>
- <div class="nav-next">
- <a href="<?php echo get_year_link( $new_archive ); ?>"><?php echo $new_archive ?></a> →
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php get_footer('home'); ?>
|