• 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: https://www.megadw.com/categoria/peliculas/accion/

    Thanks so much to read!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Category pagination problem’ is closed to new replies.