Fórum Brasileiro

[resolvido] Mostrar os Títulos dos posts (3 posts)

  1. 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???

  2. leogermani
    Moderador
    Publicado 3 meses atrás #

    <?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,,

  3. 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

Resposta

Você deve fazer login para publicar.

About this Topic

Tags

Nenhuma tag ainda.