WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] How to make excerpts (rather than full contents) appear on the front page

[Resolved] How to make excerpts (rather than full contents) appear on the front page

  • EtherealMirror
    Member

    @etherealmirror

    I know this is a very stupid question, but I have tried to find the answer here for an hour or so, but in vain. Could anyone help me out? Thanks from South Korea.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi
    Is it your own custom template, if yes make a new template files named frontpage.php copy the content of your index and replace the tag the_content() by the_excerpt()

    if its not your own template when you edit a post there is a box below the content. Its called the excerpt, put your test there.

    EtherealMirror
    Member

    @etherealmirror

    Thanks, eduplessis!

    Well, I am using the wordpress 3.0 default template called ‘twentyten’. And this is not my ‘own custom template’, is it? Actually I could not find any tags such as ‘the_content()’ and ‘the_excerpt()’ in the index file in the ‘/wp-content/themes/twentyten’ folder. Any further advice, please?

    Michael
    Forum Moderator

    @alchymyth

    TwentyTen does this in loop.php:

    edit loop.php and find this line (line132, there is also the same code on line 104, but that is the wrong line)

    <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

    change it to:

    <?php if ( is_front_page() || is_home() || is_archive() || is_search() ) : // Only display excerpts for front page, home, archives and search. ?>

    EtherealMirror
    Member

    @etherealmirror

    Wow, it works!
    Thanks a lot, alchymyth! Great!!

    thanks…it works for my problem too

    telesproperties
    Member

    @telesproperties

    This is great, but is there a way to preview a photo that I include in the post? All of my posts will have a photo and I will want them to be seen on the preview.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] How to make excerpts (rather than full contents) appear on the front page’ is closed to new replies.