Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Problema apresentado no Fórum Oficial do WordPress em http://br.forums.wordpress.org/topic/paginacao-nao-e-feita-no-index-com-o-pagenavi
- $portfolio = new WP_Query( array('category_name' => 'portfolio', 'posts_per_page' => 5, 'paged' => get_query_var('paged') ) );
- if ( $portfolio->have_posts() ) :
- while ( $portfolio->have_posts()) : $portfolio->the_post();?>
- <a href="<?php the_Permalink();?>" title="<?php the_title();?> - Paulo Mendes | Fotografia" class="a_posts">
- <div class="posts">
- <div class="posts_foto">
- <div class="titulo_img">
- <div class="titulo2">
- <?php the_title();?>
- </div>
- </div><!-- FECHA_CLASS_TÍTULO -->
- <?php if(has_post_thumbnail( )): ?>
- <?php the_post_thumbnail('featured'); ?>
- <?php else: ?>
- <img alt="<?php the_title(); ?>" src="<?php bloginfo('template_directory'); ?>/img/sem-thumbnail.jpg" />
- <?php endif; ?>
- </div><!-- FECHA_CLASS_POSTS_FOTO -->
- <span class="titulo_posts"><?php the_title();?></span>
- <?php the_excerpt(); ?>
- </div><!-- FECHA_ID_POSTS -->
- </a>
- <?php endwhile; ?>
- <div class="paginator">
- <?php wp_pagenavi( array( 'query' => $portfolio ); ?>
- </div><!--DIV_CLASS_PAGINATOR -->
- <?php else:?>
- <?php endif;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement