• I’m trying to add ajax pagination to wp 3.3.1 and could get it to work. i got the ajax portion working, however, the pages just won’t advance. Basically everytime I click “next” it will reload the current page.

    I have the following code, maybe some expert could give me some hint or help. I have demo site setup if you need to take a look it.

    here is the code

    https://pastebin.com/VBDWvN6S

    and this is in my header

    https://pastebin.com/AfrVUVwA

    Thanks very much for your help

Viewing 11 replies - 1 through 11 (of 11 total)
  • Is the problem with the jscript, or with next/previous_posts_link()?

    AFAIK, next/previous_posts_link() only work with query_posts().

    Try switching from $wp_query->query() to that.

    Thread Starter radiofranky

    (@radiofranky)

    thanks for your reply. But could you explain a little bit more about your suggestion? I have tried many different methods for “next/previous”.

    My problem is that the page won’t advance.

    thanks

    What I am suggesting is that you change this:

    $wp_query->query('cat='.$post_categories.'&posts_per_page=6&paged='.$paged);
    ?>
    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

    to this:

    query_posts('cat='.$post_categories.'&posts_per_page=6&paged='.$paged);
    ?>
    <?php while (have_posts()) : the_post(); ?>
    Thread Starter radiofranky

    (@radiofranky)

    thanks, but it’s still not working. ??
    Spent a week already…

    Thread Starter radiofranky

    (@radiofranky)

    I put this “<?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(”, ”, ”, ”, 500, false);} ?>” and it returns noting. I think there might be an issue related to this.

    Somehow the pagination is not being registered.

    thanks for the help

    Please post a link to the site where the problem can be seen, and update the pastebin so it has the code that is actually being used.

    Thread Starter radiofranky

    (@radiofranky)

    this is the latest code

    https://pastebin.com/Swds2CFv

    here is the demo site link. https://www.alieoli.com/video/26516/ Look under the main video there’re a list of videos in the same category. I’m trying to ajax the pagination there.

    thanks for the help

    I think I misunderstood what you want. In WordPress, ‘pagination’ usually means ‘go to the next page’ or ‘go to the previous page’.

    It seems that you want to ‘go to a different post’.

    The ‘PREV’ and ‘NEXT’ buttons appear to work just fine. Those are the ‘normal’ pagination.

    Thread Starter radiofranky

    (@radiofranky)

    Thanks the help. Pagination can also be used as how many you want to list in one page.

    for example, 10 posts in one page and for 11th – 20th, you click on “next” and it will load 11th to 20th posts.

    I have 3.3.1 WordPress and i cant go to settings to allow registering. there is no spot for it in settings.

    @codathon67, This does not seem at all related to this topic. You should start a new topic with a proper title.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘ajax pagination wont' advance 3.3.1, could someone take a look?’ is closed to new replies.