Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Blog
- */
- ?>
- <?php
- /**
- * The template for displaying all pages.
- *
- * This is the template that displays all pages by default.
- * Please note that this is the WordPress construct of pages
- * and that other 'pages' on your WordPress site will use a
- * different template.
- *
- * @package Toolbox
- * @since Toolbox 0.1
- */
- get_header(); ?>
- <div id="primary">
- <div id="content" role="main">
- <?php while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'content', 'page' ); ?>
- <?php
- if(is_front_page() || is_home()) {
- include (ABSPATH . '/wp-content/plugins/coin-slider-4-wp/coinslider.php');
- } ?>
- <?php
- $args = array(
- 'posts_per_page' => 2,
- 'paged' => get_query_var( 'paged' )
- );
- $myposts = new WP_Query( $args ); ?>
- <?php if( $myposts->have_posts() ) : ?>
- <ul>
- <?php while( $myposts->have_posts() ) : $myposts->the_post(); ?>
- <li>
- <p>
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
- <?php the_title(); ?>
- </a>
- </p>
- <p>
- <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
- <?php the_post_thumbnail( 'medium' ); ?>
- </a>
- </p>
- <p><?php the_excerpt(); ?></p>
- </li>
- <?php endwhile; ?>
- </ul>
- <nav id="nav-below">
- <div class="nav-previous">
- <?php next_posts_link( '← Pagina precedente', $myposts->max_num_pages ); ?>
- </div>
- <div class="nav-next">
- <?php previous_posts_link( 'Pagina successiva →', $myposts->max_num_pages ); ?>
- </div>
- </nav>
- <?php endif; ?>
- <?php wp_reset_postdata(); ?>
- <?php comments_template( '', true ); ?>
- <?php endwhile; // end of the loop. ?>
- </div><!-- #content -->
- </div><!-- #primary -->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement