Impossible? Adding pagination to a loop in custom page.
-
I have been searching for the answer to this to no avail. Hopefully, you guys could point me in the correct direction.
?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php get_template_part( ‘content’, ‘page’ ); ?>
<?php endwhile; else: endif; ?><?php query_posts(‘category_name=’.get_the_title().’&post_status=publish,future’);?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?><div class=”cattemptwrapper”>
<div class=”cattempthumbnail”>“><?php the_post_thumbnail(‘thumbnail’); ?></div><div class=”cattemptitle”><h1>“><?php if (strlen($post->post_title) > 40) {
echo substr(the_title($before = ”, $after = ”, FALSE), 0, 40) . ‘…’; } else {
the_title();
} ?></h1></div><div class=”cattempinfo”>
<div class=”cauthor”>by <?php the_author_posts_link(); ?></div><div class=”cviews”><?php if (function_exists(‘wpp_get_views’)) { echo wpp_get_views( get_the_ID() ); } ?> views</div>
<div class=”cdate”> <?php echo human_time_diff( get_the_time(‘U’), current_time(‘timestamp’) ) . ‘ ago’; ?></div></div>
</div><!–#cattemptwrapper–>Any help would be greatly appreciated. I’m running out of ideas on how to enable pagination and my php knowledge is limited. Thank you for taking the time.
- The topic ‘Impossible? Adding pagination to a loop in custom page.’ is closed to new replies.