<?php
/**
*
* Template Name: Portfolio Template
*
*/
get_header(); ?>
<div id="primary" class="site-content">
<div id="content" role="main">
<div class="portfolio-slider">
<!-- Change number 5 to amount of slides you want to show -->
<?php if(function_exists('show_featured_posts')) echo show_featured_posts('5'); ?>
</div> <!-- .grid-slider -->
<div class="section group">
<?php
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*/
// fix for pagination on static homepage
global $paged, $wp_query, $wp;
$args = wp_parse_args($wp->matched_query);
if ( !empty ( $args['paged'] ) ) {
$wp_query->set('paged', $args['paged']);
$paged = $args['paged'];
}
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('cat=0&posts_per_page=4&paged='.$paged); //set your own query here
get_template_part( 'loop', 'portfolio' );
wp_reset_query();
?>
</div><!-- .section group -->
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar( 'front' ); ?>
<?php get_footer(); ?>