you just need a pagination function first then style it using css. you can do this w/o plugin but you need to edit yout theme files.
Blacklizt – Thank you!
I have run into some errors with the pagination, unfortunately…
I can not quite figure where to insert the <?php echo paginate_links( $args ) ?>
line into my main index code:
<?php get_header(); ?>
</div><div id="gridContainer">
<?php
$slug = 'information';
$category = get_category_by_slug($slug);
query_posts($query_string . '&cat=-' . $category->cat_ID);
?>
<?php
$c = 1; //init counter
$bpr = 3; //boxes per row
if(have_posts()) :
while(have_posts()) :
the_post();
?>
<div class="gridpost" id="post-<?php the_ID(); ?>">
<a href="<?php the_permalink(); ?>"><div class="postImage" id="fade">
<div class="postData"><div id="gridTitle"><?php the_title(); ?></div></div><?php the_post_thumbnail('grid-post-image'); ?></a>
</div>
<?php if($c%3 == 0){
$c = 'last';
}else{
$c = '';
}
$c++;
?>
</div>
<?php
if($c == $bpr) :
?>
<div class="clr"></div>
<?php
$c = 0;
endif;
?>
<?php
$c++;
endwhile;
endif;
?>
<div class="clr"></div>
</div>
<?php get_footer(); ?>
It is not showing up at all, regardless of where I place it. I can only assume it’s user error on my part, so any help would be immensely appreciated!
Also, this is the theme function I am calling:
global $wp_query;
$total_pages = $wp_query->max_num_pages;
if ($total_pages > 1){
$current_page = max(1, get_query_var('paged'));
echo '<div class="page_nav">';
echo paginate_links(array(
'base' => get_pagenum_link(1) . '%_%',
'format' => '/page/%#%',
'current' => $current_page,
'total' => $total_pages,
'prev_text' => 'Prev',
'next_text' => 'Next'
));
echo '</div>';
}