Pagination don't works
-
I have this code:
<br /> <?php<br /> $my_query = null;<br /> $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;<br /> $my_query = new WP_Query(array('post_type'=>array('post','articulos'), 'posts_per_page' => 10, 'paged' => $paged));<br /> if ( $my_query->have_posts() ) : while ( $my_query->have_posts() ) : $my_query->the_post();<br /> if ($my_query->post->post_type == 'post') {?></p> <p>div...</p> <p><?php } if ($my_query->post->post_type == 'articulos') {?></p> <p>div...</p> <p><?php } else; endwhile;?><br /> <div id="navigation"><br /> <div class="previous"><?php previous_posts_link( __( 'Anterior' ) ); ?><div class="clear"></div></div><br /> <div class="next"><?php next_posts_link( __( 'Siguiente' ) ); ?><div class="clear"></div></div><br /> </div><br /> <?php endif; ?><br /> <div class="clear"></div><br /> </div>
But the pagination only works if more than 10 normal post.
[No bumping. If it’s that urgent, consider hiring someone.]
- The topic ‘Pagination don't works’ is closed to new replies.