We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey Ben,
The default post navigation uses the standard, boring Older Posts or Newer Posts
<?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ($wp_query->max_num_pages > 1) { ?> <nav id="post-nav" class="pager"> <div class="previous"><?php next_posts_link(__('← Older posts', 'roots')); ?></div> <div class="next"><?php previous_posts_link(__('Newer posts →', 'roots')); ?></div> </nav> <?php } ?>
Referencing http://wp.tutsplus.com/tutorials/wordpress-pagination-a-primer/ I think a much more usable alternative would be the following:
<?php /* Display navigation to next/previous pages when applicable */ ?> <?php 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>'; } ?>
As it states in the article, this will put both Prev, Next and page numbers as well.
I know I keep throwing these code changes at you - I'll sit down and learn how to properly do these through GitHub soon :)
The text was updated successfully, but these errors were encountered:
we should use the bootstrap pagination. i've got it in use on http://benword.com utilizing some slightly modified code from @eddiemachado's bones
Sorry, something went wrong.
gonna close this for now.. i'd recommend using http://wordpress.org/extend/plugins/wp-pagenavi/
No branches or pull requests
Hey Ben,
The default post navigation uses the standard, boring Older Posts or Newer Posts
Referencing http://wp.tutsplus.com/tutorials/wordpress-pagination-a-primer/ I think a much more usable alternative would be the following:
As it states in the article, this will put both Prev, Next and page numbers as well.
I know I keep throwing these code changes at you - I'll sit down and learn how to properly do these through GitHub soon :)
The text was updated successfully, but these errors were encountered: