Problem with the loop (3 posts)

  1. alexborras
    Posted 6 years ago #

    I am using this code to see a list of post titles:

    <?php while (have_posts()) : the_post(); ?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    <?php endwhile;?>

    the result is correct:
    * Post 1
    * Post 2
    * ...
    but after seeing the list is again the full content of the Post:
    Post 1
    Text of Post 1 ...
    Post 2
    Text of Post 2 ...

    Is there a way to view only the list of the titles of the Post?

  2. Mark / t31os

    Posted 6 years ago #

    If you're seeing content it's not the result of the code you have above, there's nothing in that code that would output the post content.

  3. alexborras
    Posted 6 years ago #

    OK, thanks

Topic Closed

This topic has been closed to new replies.

About this Topic