WordPress.org

Ready to get started?Download WordPress

Forums

Responsive
[resolved] Can't make pagination work on a Blog-excerpt as a home page (5 posts)

  1. dessita@gmail.com
    Member
    Posted 1 year ago #

    I need to set up the blog-exerpt as a home page and even though it wasn't difficult to set up the pagination doesn't work since I did it.
    What happens is that when I go to the home page from the navigation - pressing the button "Home" - it all looks and works as expected. If I just go to the index.php though - I mean directly to the main URL - without pressing any buttons, then once I go to the next page it seems all messed up.
    I'm using this code in the index.php
    <div class="content">
    <?php the_excerpt(); ?>
    </div>'

    and for pagination I use the following function
    function kriesi_pagination($pages = '', $range = 2)
    {
    $showitems = ($range * 2)+1;

    global $paged;
    if(empty($paged)) $paged = 1;

    if($pages == '')
    {
    global $wp_query;
    $pages = $wp_query->max_num_pages;
    if(!$pages)
    {
    $pages = 1;
    }
    }

    if(1 != $pages)
    {
    echo "<div class='pagination'>";
    if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "«";
    if($paged > 1 && $showitems < $pages) echo "";

    for ($i=1; $i <= $pages; $i++)
    {
    if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
    {
    echo ($paged == $i)? "<span class='current'>".$i."</span>":"".$i."";
    }
    }

    if ($paged < $pages && $showitems < $pages) echo "";
    if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "»";
    echo "</div>\n";
    }
    }

    It seams to be trying to load next page using the home.php instead of blog-exerpt.php

    I'm working with the Responsive Child Theme ver.1.0

    Thanks a lot in advance!

  2. Emil Uzelac
    Theme Review Admin
    Posted 1 year ago #

    Hi,

    No need to do all that, if you're using any of the Blog Templates, pagination will work by default.

    Thanks,
    Emil

  3. Dying2Live
    Member
    Posted 1 year ago #

    I'm having the same issue and I'm using the blog summery template. Was this ever resolved?

  4. Dying2Live
    Member
    Posted 1 year ago #

    ***Sorry It's called Blog Excerpt (summary) template

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Please visit Responsive's dedicated support forum at http://cyberchimps.com/forum/free/responsive/

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic