Title: Category pagination problem
Last modified: August 22, 2016

---

# Category pagination problem

 *  [Ferrrmolina](https://wordpress.org/support/users/ferrrmolina/)
 * (@ferrrmolina)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/category-pagination-problem/)
 * Hi!
    Its my first topic here, i’m from Argentina, and my english is poor, please
   understand me. I’ve a wordpress site, where i’ven’t a category.php template.
 * In my index.php i’ve these:
 *     ```
       <?php get_header(); ?>
       <?php if( in_category( array('peliculas','accion','animacion','aventuras','belico','ciencia-ficcion','comedia','drama','fantastico','romance','terror','thriller') ) ){
       	get_template_part('loop', 'peliculas');
       }?>
       <?php if ( in_category(array('musica','ambiente','bachata','blues','country','cuarteto','cumbia','dance','dubstep','electronica','heavy-metal','hip-hop','house','jazz','pop','reggae','reggaeton','rock-nacional','rock-internacional','salsa','soul','tecno') ) ){
       	get_template_part('loop', 'musica');
       }?>
       <?php if ( in_category(array('software') ) ) {
       	get_template_part('loop', 'software');
       }?>
       <div class="clearfix"></div>
       <?php get_footer(); ?>
       ```
   
 * All loops are same:
 *     ```
       <?php $currentCategory = single_cat_title("", false);
       	$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       	$query = array(
       	 'category_name' => $currentCategory,
         	 'paged'=> $paged,
        	 'posts_per_page' => '18',
        	 'order' => 'DESC'
       	);
       $page = new WP_Query( $query );
       ?>
        <?php if ( $page->have_posts() ) : while ( $page->have_posts() ) : $page->the_post(); ?>
   
       //loop items
       <?php endwhile; endif; wp_reset_query(); ?>
   
       <div class="clear"></div>
       <?php pagination_links(); ?>
       ```
   
 * The problem? The page is always displayed!
    Can any help me?
 * More info if you can see the problem:
    Category: Peliculas. Post per page: 18
   Link: [http://www.megadw.com/categoria/peliculas/accion/](http://www.megadw.com/categoria/peliculas/accion/)
 * Thanks so much to read!

Viewing 1 replies (of 1 total)

 *  Thread Starter [Ferrrmolina](https://wordpress.org/support/users/ferrrmolina/)
 * (@ferrrmolina)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/category-pagination-problem/#post-5639944)
 * Solved. I’ve change the read config, and this work 🙂

Viewing 1 replies (of 1 total)

The topic ‘Category pagination problem’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Ferrrmolina](https://wordpress.org/support/users/ferrrmolina/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/category-pagination-problem/#post-5639944)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
