Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6695

    Hi!

    I’ve written you in the past about my blog – http://hollyandrose.com/ – and the difficulty I’ve been having in finding the source of the problem causing my blog page numbers not to function properly. I’ve tried deactivating all my plugins and then reactivating them (like you recommended), but clicking on page 2 and 3 just refreshes the current page – page 1 – instead of loading previous posts.

    Could I please provide you with the username and password to my admin page so you could have a look to possibly fix the problem?

    I really appreciate your help.

    Cheers,

    Holly

    #55136

    Hey,

    Levitations blog isn’t layed out for frontpage/homepage usage (normally the frontpage/homepage shows a slider, etc.). You can try to replace the Kriesi’s pagination code with an updated version which also works on the frontpage. Open up levitationoptionspagination.php and delete all code lines. Then insert:

    <?php
    function kriesi_pagination($pages = ''){
    global $paged;

    if(get_query_var('paged')) {
    $paged = get_query_var('paged');
    } elseif(get_query_var('page')) {
    $paged = get_query_var('page');
    } else {
    $paged = 1;
    }

    $output = "";
    $prev = $paged - 1;
    $next = $paged + 1;
    $range = 2; // only edit this if you want to show more page-links
    $showitems = ($range * 2)+1;

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

    if(1 != $pages)
    {
    $output .= "<div class='pagination'>";
    $output .= ($paged > 2 && $paged > $range+1 && $showitems < $pages)? "<a href='".get_pagenum_link(1)."'>«</a>":"";
    $output .= ($paged > 1 && $showitems < $pages)? "<a href='".get_pagenum_link($prev)."'>‹</a>":"";

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

    $output .= ($paged < $pages && $showitems < $pages) ? "<a href='".get_pagenum_link($next)."'>›</a>" :"";
    $output .= ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) ? "<a href='".get_pagenum_link($pages)."'>»</a>":"";
    $output .= "</div>n";
    }

    echo $output;
    }

    If this doesn’t work you can use use wp-paginate: http://wordpress.org/extend/plugins/wp-paginate/ instead of Kriesi’s pagination function.

    #55137

    Hi,

    I tried copying your new code into the function and the pagination control disappeared completely. Primarily what the problem is with the existing pagination function is that it increments the paged=x (http://hollyandrose.com/?paged=2) in the url but never redirects to that page.

    So, I’ve downloaded the wp-pagination plugin and installed it on the site. I was unable to implement this as the instructions from the link you provided talked about replacing code blocks in files that I cannot find (I have taken a copy and pasted these below).

    Can you please provide further support around implementing the wp-pagination plugin?

    Thank you.

    Holly


    For posts pagination: 1) Open the theme files where you’d like pagination to be used. Usually this is the loop.php file. For older version of WordPress, you may need to update the index.php, archive.php and search.php files.

    2) Replace your existing previous_posts_link() and next_posts_link() code block with the following:

    <?php if(function_exists(‘wp_paginate’)) {

    wp_paginate();

    } ?>

    #55138

    Holly, I am experiencing the same pagination problem. The pagebreak code built into WordPress does not work with the Newscast Theme. I am running the latest WordPress and version 2.0.2 of Newscast. I am also unable to find the previous_posts_link() and next_posts_link() code in any of the theme files. Stuck on this one too. Hopefully someone has an answer for us.

    Thank you,

    Michael

    #55139

    Hi,

    i was wondering if we are any closer to solving the pagination issue on newscast.

    thanks

    Cezar

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Blog post pages not working…’ is closed to new replies.