Title: Pagination
Last modified: August 20, 2016

---

# Pagination

 *  [antistandard](https://wordpress.org/support/users/antistandard/)
 * (@antistandard)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/pagination-14/)
 * Hi,
    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 ](http://codex.wordpress.org/Forum_Welcome)-
   please use the [pastebin ](http://pastebin.com/)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.
 * James

The topic ‘Pagination’ is closed to new replies.

## Tags

 * [pagination](https://wordpress.org/support/topic-tag/pagination/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [antistandard](https://wordpress.org/support/users/antistandard/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/pagination-14/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
