The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Pagination (1 post)

  1. antistandard
    Posted 5 years ago #

    I have a function that lists all posts in a category and also, all the sub-posts in that category:

    [code moderated per forum rules - please use the pastebin for any code longer than 10 lines]

    I added a pagination code block in there:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
            $cat_posts = get_posts('numberposts=3&paged=$paged&category_name='.$sub_cat_name);

    but it doesn't seem to work. I have WP-Pagination installed and I used the call to that function and it doesn't work either. It's like my code is immune to pagination. When I say it doesn't work, i mean that i get no pagination but no real decriptive errors or any error at all either.

    Can anyone who can read this php better than me help please. I wrote it a while ago and can't really remember how it works or what I am doing wrong.

    Thank you very much for your time.


Topic Closed

This topic has been closed to new replies.

About this Topic