• Resolved radjavi

    (@radjavi)


    Hello, I recently installed a new theme and it’s working perfectly except that the page navigation doesn’t work, when I click page 2 it sends me back to page 1 even though the URL is /page/2.

    My index.php: http://pastebin.com/R44VeaUM

Viewing 8 replies - 1 through 8 (of 8 total)
  • First things first, reload your rewrite rules as they may have been obscured by the themes functions.

    To do this go to settings -> permalinks -> save.

    If this doesn’t solve the issue let me know.

    Note: I haven’t looked at your code as not enough time right now.

    Thread Starter radjavi

    (@radjavi)

    I have already tried the permalinks but it does not fix it.

    I have read other posts about this issue and they have fixed the issue by people giving them the right coding for the index.php, but I’m not that good in coding so..

    I have tried their fixes as well but it doesn’t work for me.

    Good Guy

    (@mytaxsitecouk)

    Have you got a live link for us to see it in action?

    If you have changed the permalinks, you also need to check if the .htaccess file has also made the necessary changes. This should be in the WordPress folder and sometimes it is hidden.

    Thread Starter radjavi

    (@radjavi)

    Here is the website: http://www.fgnews.hostzi.com/

    Scroll down to the bottom of the homepage.

    Moderator keesiemeijer

    (@keesiemeijer)

    I think your home page is using a Page template to show the posts (page-blog-3.php?).

    Look in that page template for this:

    $paged = (get_query_var("paged")) ? get_query_var("paged") : 1;

    and change it to:

    $paged = (get_query_var("page")) ? get_query_var("page") : 1;

    http://codex.wordpress.org/Pagination#Troubleshooting_Broken_Pagination

    As this is a premium theme which you paid for, your purchase should have included support from either the theme author or where you purchased the theme from. It would be best to contact them for specific instructions on how solve this issue.

    Thread Starter radjavi

    (@radjavi)

    There is no such code in the page template, here is my page-blog-3.php: http://pastebin.com/hbJwQdfe

    Moderator keesiemeijer

    (@keesiemeijer)

    Try changing this:

    $args=array(
        'cat' => $select_blog_category,
        'orderby' => 'date',
        'order' => 'DESC',
        'paged' => $paged
        );

    to this:

    if ( get_query_var('paged') ) { $paged = get_query_var('paged'); }
    elseif ( get_query_var('page') ) { $paged = get_query_var('page'); }
    else { $paged = 1; }
    $args=array(
        'cat' => $select_blog_category,
        'orderby' => 'date',
        'order' => 'DESC',
        'paged' => $paged
        );

    Thread Starter radjavi

    (@radjavi)

    It worked, thanks a lot!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Page navigation doesn't work’ is closed to new replies.