Quantcast
Viewing all articles
Browse latest Browse all 13924

Nichlas on "My pagination doesn't show up"

@alchymyth, heres the full code of the work.php template:

'<?php /* Template Name: Work */ get_header(); ?>

<main role="main">
<!-- section -->
<section>

<?php

$args = array('post_type'=> 'work');

$the_query = new WP_Query( $args );
if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();

?>

<!-- article -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<!-- post title -->
<h1>
" title="<?php the_title(); ?>"><?php the_title(); ?>
</h1>
<!-- /post title -->

<!-- post details -->
<h3><?php the_field('client'); ?></h3>
<?php if (get_the_tags()) :?> <li class="tags"><?php the_tags(' #',' #'); ?> <?php endif;?>
<!-- /post details -->

<!-- project info -->
<p><?php the_field('intro'); ?></p>
<!-- /project info -->

<!-- gallery -->
<?php

$images = get_field('gallery');

if( $images ): ?>
<?php foreach( $images as $image ): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<p><?php echo $image['caption']; ?></p>
<?php endforeach; ?>
<?php endif; ?>
<!-- /gallery -->

<?php the_content(); ?>

</article>
<!-- /article -->

<?php endwhile; ?>

<?php else: ?>

<!-- article -->
<article>

<h2><?php _e( 'Sorry, nothing to display.', 'html5blank' ); ?></h2>

</article>
<!-- /article -->

<?php endif; ?>

<?php get_template_part('pagination'); ?>

</section>
<!-- /section -->
</main>

<?php get_sidebar(); ?>

<?php get_footer(); ?>
'


Viewing all articles
Browse latest Browse all 13924

Trending Articles