WordPress.org

Ready to get started?Download WordPress

Forums

About the excerpt tag (4 posts)

  1. frankpereiro
    Member
    Posted 8 years ago #

    Hi everyone, I've been trying to get something by searching but I get no results on this.

    I just want "the excerpt" to show in the main page but when a visitor clicks on the "read more" or the "permalink" tags he/she can read the entire post without the excerpt showing.

    I know how to do that when someone is seeing the posts by category or the archive (is really well explained in the codex), I just need to learn how to do that from the index page.

    Thanks in advanced for any help.

    Greetings,

  2. moshu
    Member
    Posted 8 years ago #

    Just replace the_content with the_excerpt in the index.php file of your theme.

  3. frankpereiro
    Member
    Posted 8 years ago #

    Thank you moshu

    I've tried that and it works.

    But, it doesn't work with all the templates, though. For some reason it only works with the default template and (very) few others which I can't remember their names right now.

    Thanks again moshu :-)

  4. frankpereiro
    Member
    Posted 8 years ago #

    I have another question,

    How can I use someting like so:

    <?php if(is_category() || is_archive() || is_search() || is_index()) { the_excerpt(); } else { the_content(); } ?>

    For the index, I mean.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.