Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Home Template
- */
- ?>
- <?php get_header(); ?>
- <!--BEGIN #primary .hfeed-->
- <div id="primary" class="hfeed">
- <?php wp_reset_query(); $paged = (get_query_var('paged')) ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1 );
- global $wp_query, $paged;
- $temp = $wp_query;
- $wp_query = null;
- $wp_query = new WP_Query();
- $args = array(
- 'post_type' => 'portfolio',
- 'paged' => $paged,
- 'posts_per_page' => 15
- );
- query_posts($args); ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <!--BEGIN .hentry -->
- <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
- <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) { ?>
- <div class="post-thumb">
- <a title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>" href="<?php the_permalink(); ?>">
- <?php the_post_thumbnail('portfolio-thumb'); ?>
- </a>
- </div>
- <?php } ?>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>"> <?php the_title(); ?></a></h2>
- <!--BEGIN .entry-meta -->
- <div class="entry-meta">
- <span class="entry-skills"><?php the_terms($post->ID, 'skill-type', '', ', ', ''); ?></span>
- <!--END .entry-meta -->
- </div>
- <!--END .hentry-->
- </div>
- <?php endwhile; ?>
- <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
- <?php $wp_query = null; $wp_query = $temp; ?>
- <!--BEGIN .navigation .page-navigation -->
- <div class="navigation page-navigation">
- <div class="nav-next"><?php next_posts_link(__('← Older Entries', 'framework')) ?></div>
- <div class="nav-previous"><?php previous_posts_link(__('Newer Entries →', 'framework')) ?></div>
- <!--END .navigation .page-navigation -->
- </div>
- <?php wp_reset_postdata(); ?>
- <!--END #primary .hfeed-->
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment