rafaelzezao
Membro
Publicado 3 meses atrás #
Estou tentando usar esse código para mostrar em uma página os títulos de uma categoria mas só tah mostrando 5 resultados e eu axo que é pq nas minhas configs eu coloquei 5 posts por página.
<?php query_posts('cat=12');?>
<?php while (have_posts()) : the_post(); ?>
<div>
<table>
<tr>
<td>
<?php the_time('M') ?>
<?php the_time('d') ?>
</td>
<td>
<h3>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?>
</h3></td>
</tr>
</table>
</div>
<?php endwhile; ?>
Tem alguma coisa que eu possa fazer para mostrar tudo???
<?php query_posts('cat=12&showposts=-1');?>
veja a documentação da função query_posts para todas as opções:
http://codex.wordpress.org/Template_Tags/query_posts
Leo,,
rafaelzezao
Membro
Publicado 3 meses atrás #
Obrigado cara coloquei meu código assim e resolveu meu problema:
<?php query_posts ("cat=12&showposts=300");?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div>
<table>
<tr>
<td>
<?php the_time('M') ?>
<?php the_time('d') ?>
</td>
<td>
<h3>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?>
</h3></td>
</tr>
</table>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
Um grande abraço e valew pela dica xD