Add pagination numbers to wordpress loop

Like i comment in title, i wish add pagination buttons to this loop. 1 2 3 next

<?php /* The loop */ ?>
        <?php while ( have_posts() ) : the_post(); ?>
            <?php get_template_part( 'content', get_post_format() ); ?>
        <?php endwhile; ?>

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

Answers


Numbered pagination by following this article, I use it on my own website and it works :

http://www.wpbeginner.com/wp-themes/how-to-add-numeric-pagination-in-your-wordpress-theme/


Adding pagination is very simple and just requires including the code into your page.

<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
        <?php get_template_part( 'content', get_post_format() ); ?>
    <?php endwhile; ?>
<div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div>
<div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div>
<?php else : ?>
    <?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>

You can read more about pagination here: Pagination


Need Your Help

C# updating information in an exe file

c# exe updates recompile

Im building an application that should consist of a single .exe file which in turn will be distributed by others. In this .exe file there is two hardcoded fields, username and password. The people ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.