Ejemplo n.º 1
0
if (get_query_var('paged')) {
    $paged = get_query_var('paged');
} elseif (get_query_var('page')) {
    $paged = get_query_var('page');
} else {
    $paged = -1;
}
$posts_per_page = get_option('jetpack_portfolio_posts_per_page', '-1');
$args = array('post_type' => 'jetpack-portfolio', 'paged' => $paged, 'posts_per_page' => $posts_per_page);
$project_query = new WP_Query($args);
if (post_type_exists('jetpack-portfolio') && $project_query->have_posts()) {
    while ($project_query->have_posts()) {
        $project_query->the_post();
        get_template_part('content', 'portfolio');
    }
    wds_portfolio_paging_nav($project_query->max_num_pages);
    wp_reset_postdata();
} else {
    ?>

				<section class="no-results not-found">
					<header class="page-header">
						<h1 class="page-title"><?php 
    _e('No Project Found', 'wds_portfolio');
    ?>
</h1>
					</header><!-- .page-header -->

					<div class="page-content">
						<?php 
    if (current_user_can('publish_posts')) {
Ejemplo n.º 2
0
        ?>

				<?php 
        /* Include the Post-Format-specific template for the content.
         * If you want to override this in a child theme, then include a file
         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
         */
        get_template_part('content', get_post_format());
        ?>

			<?php 
    }
    ?>

			<?php 
    wds_portfolio_paging_nav();
    ?>

		<?php 
} else {
    ?>

			<?php 
    get_template_part('content', 'none');
    ?>

		<?php 
}
?>

		</main><!-- #main -->