WordPress.org

Ready to get started?Download WordPress

Forums

Asteria Lite
[resolved] Blog Page Not Showing All Blogs or Pagination (3 posts)

  1. Michael Bailey
    Member
    Posted 6 months ago #

    Hello,

    On this page, http://hmbailey.com/blog/, I am not able to see more than six blog posts at a time. I also can't get a pagination, previous, next, etc. at the bottom.

    Thanks very much for your help.

  2. Towfiq I.
    Member
    Theme Author

    Posted 6 months ago #

    to fix the pagination, Open up page-blog.php and replace this:

    <?php
            global $wp_query;
            $big = 999999999; // need an unlikely integer
                echo paginate_links( array(
                    'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
                    'format' => '?paged=%#%',
                    'current' => max( 1, get_query_var('paged') ),
                    'total' => $wp_query->max_num_pages,
                    'show_all'     => true,
                    'prev_next'    => false
    
                ) );
        ?>

    with this:

    <?php
            global $the_query;
            $big = 999999999; // need an unlikely integer
                echo paginate_links( array(
                    'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
                    'format' => '?paged=%#%',
                    'current' => max( 1, get_query_var('paged') ),
                    'total' => $the_query->max_num_pages,
                    'show_all'     => true,
                    'prev_next'    => false
    
                ) );
        ?>
  3. Michael Bailey
    Member
    Posted 6 months ago #

    Thank you. Seems to work.
    Shouldn't there also be pagination, or at next/previous post titles on the individual posts pages?

    M

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.