• Resolved emanuelme

    (@emanuelme)


    I have set up a wordpress site that uses Ultra Business WordPress Theme. It has a built in pagination.php
    The problem I am having is that I set up the blog page to call up just a particular category and pagination isnt working there.
    Here is a link to the page;
    http://bethmichelle.com/?page_id=79
    When you click page 2 on the bottom, it returns to page 1. How can I manipulate pagination to work for the categories?

    Here is the code from the blog-template.php;

    <?php
    //Pagination
    if (function_exists("pagination")) { pagination($additional_loop->max_num_pages); } ?>

    and here is the code from the pagination.php function;

    [code moderated – please use the pastebin]

    I don’t know too much about coding, but i should be able to follow. Note, that it does work on the archive page here
    http://bethmichelle.com/?m=201103

    thanks!!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    I set up the blog page to call up just a particular category and pagination isnt working there.

    check that your query contains the ‘paged’ parameter for pagination:

    http://codex.wordpress.org/Function_Reference/WP_Query#Pagination_Parameters

    Thread Starter emanuelme

    (@emanuelme)

    I have
    <?php query_posts('category_name=blog'); ?>
    in the blog-template.php

    Michael

    (@alchymyth)

    try:

    <?php query_posts('category_name=blog&paged=' . get_query_var('paged')); ?>

    if that does not work, try:

    <?php query_posts('category_name=blog&paged=' . get_query_var('page')); ?>

    or:

    <?php global $query_string; query_posts($query_string .'&category_name=blog'); ?>

    Thread Starter emanuelme

    (@emanuelme)

    The first one worked like a charm.
    <?php query_posts('category_name=blog&paged=' . get_query_var('paged')); ?>
    Thanks so much for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Pagination on categories page with pagination.php function’ is closed to new replies.