<?php
/*
Template Name: archive
*/
?>
<?php get_header(); ?>
<div class="page-content-wrapper">
<div class="single-page-content">
<div class="breadcrumbs" typeof="BreadcrumbList" vocab="http://schema.org/">
<?php if(function_exists('bcn_display'))
{
bcn_display();
}?>
</div>
<div class="news-sidebar-row">
<?php wp_nav_menu( array( 'container_class' => 'news-menu', 'menu' => 'news' , 'menu_class' => 'news-nav' , 'theme_location' => 'primary' ) ); ?>
</div>
<article>
<div class="entry">
<?php // Display blog posts on any page
$temp = $wp_query; $wp_query= null;
$wp_query = new WP_Query(); $wp_query->query('showposts=5' . '&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="news-entry">
<?php the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) ); ?>
<div class="news-title">
<p><?php the_date(); ?></p>
<h4><a href="<?php the_permalink(); ?>" title="Читати далі"><?php the_title(); ?></a></h4>
</div>
<div class="news-excerpt">
<?php echo(get_the_excerpt()); ?>
<div class="read-more-news"><a href="<?php the_permalink(); ?>" title="Читать дальше">Читать дальше</a></div>
</div>
</div>
<?php endwhile; ?>
</article>
<?php if ($paged > 1) { ?>
<nav id="nav-posts">
<div class="prev"><?php next_posts_link('« Previous Poss'); ?></div>
<div class="next"><?php previous_posts_link('Newer Posts »'); ?></div>
</nav>
<?php } else { ?>
<nav id="nav-posts">
<div class="prev"><?php next_posts_link('« Предыдущие посты'); ?></div>
</nav>
<?php } ?>
<?php wp_reset_postdata(); ?>
</div>
</div>
<?php get_footer(); ?>
<?php
/*
Template Name: archive
*/
?>
<?php get_header(); ?>
<div class="page-content-wrapper">
<div class="single-page-content">
<div class="breadcrumbs" typeof="BreadcrumbList" vocab="http://schema.org/">
<?php if(function_exists('bcn_display'))
{
bcn_display();
}?>
</div>
<div class="news-sidebar-row">
<?php wp_nav_menu( array( 'container_class' => 'news-menu', 'menu' => 'news' , 'menu_class' => 'news-nav' , 'theme_location' => 'primary' ) ); ?>
</div>
<article>
<div class="entry">
<?php if ( have_posts() ) : ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();?>
<div class="news-entry">
<?php the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) ); ?>
<div class="news-title">
<p><?php the_date(); ?></p>
<h4><a href="<?php the_permalink(); ?>" title="Читати далі"><?php the_title(); ?></a></h4>
</div>
<div class="news-excerpt">
<?php echo(get_the_excerpt()); ?>
<div class="read-more-news"><a href="<?php the_permalink(); ?>" title="Читать дальше">Читать дальше</a></div>
</div>
</div>
<?php endwhile; ?>
</div>
</article>
<?php
the_posts_pagination( array(
'prev_text' => __( 'Previous page' ),
'next_text' => __( 'Next page' ),
'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page' ) . ' </span>',
) ); ?>
<?php endif;
?>
</div>
</div>
<?php get_footer(); ?>