wordpress 404 after click on pagination links -


i have problem pagination in wordpress. i'm having category-template wich involkes query custom posts. problem when add pagination , go next page pagination add $_get['paged'] template reject , trow 404 page. discovered if $_get['paged']=1 works fine if 2 or more throw 404 page. thing try in index loop , not work. i'm using html5blank theme.

here code query:

<section id="inner-pad"> <?php  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;     $args = array( //'posts_per_page' => 6, 'post_type' =>  'menu-pub', 'cat' =>3, 'paged' => $paged, 'order'=>'desc' ); $wp_query = new wp_query( $args ); $i=1; while ( $wp_query->have_posts() ) {     $wp_query->the_post();     ?>   <article class="article-first-vision <?= ($i==2)?'mar':'' ?>" >   <?php if ( has_post_thumbnail()) { ?>   <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">   <?php the_post_thumbnail('menu-pub'); ?>   </a>   <?php }; ?>   <h2>     <?php the_title(); ?>   </h2>   <p>     <?php the_content(); ?>   </p>   </article>   <?php   if($i==3){$i=0;}enter code here   $i++; } ?>     </section>     <?php       $big = 999999999;      echo paginate_links(array(     'base' => str_replace($big, '%#%', get_pagenum_link($big)),     'format' => '?paged=%#%',     'current' => max(1, get_query_var('paged')),     'total' => $wp_query->max_num_pages      ));      ?> 

here new dialog put theme this:

http://wordpress.org/support/topic/custom-post-and-category-template-pagination-problem?replies=2#post-4560385

try add global $wp_query before paginate_links()


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -