WordPress.org

Ready to get started?Download WordPress

Forums

WP-PageNavi
[resolved] Pagination doesnt work with post types plugin (2 posts)

  1. jeremie74
    Member
    Posted 2 years ago #

    Hi i try to use Wp Page Navi on a custom post types but it doesnt work. It shows but the navigation doesnt work. Here is my code :

    <?php $custom_query = new WP_Query();
    				$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    				$custom_query = new WP_Query('cat=6&paged=' . $paged.'&posts_per_page=2');
    				while($custom_query->have_posts()) : $custom_query->the_post(); ?>
    					<li>
    
    					<?php
    						$img="";
    						$args = array(
    						'post_parent'    => $post->ID,
    						'post_type'      => 'attachment',
    						'numberposts'    => 1,
    						'post_mime_type' => 'image'
    						);
    						$attachs = get_posts($args);
    						$img=wp_get_attachment_image_src($attachs[0]->ID,'full');
    					?>
    
    					<div id="colonne-prod-df-img"><img src="<?php thumbGen($img[0],136,172,additional_parameters); ?>"></div>
    					<h1><?php cuttextmaxtit($post->post_title,30); ?></h1>
    					<p class="detail-prods"></p>
    					<p class="detail-prods-sub"><?php echo excerpt(80); ?></p>
    					<p><a href="<?php the_permalink(); ?>">Voir le produit ></a></p>
    					</li>
    			<?php endwhile; ?>
    
    			</ul>
    
    			<div id="pages-next"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>

    http://wordpress.org/extend/plugins/wp-pagenavi/

  2. jeremie74
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic