Ready to get started?Download WordPress


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

  1. EtherealMirror
    Posted 4 years ago #

    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.

  2. Edouard Duplessis
    Posted 3 years ago #

    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.

  3. EtherealMirror
    Posted 3 years ago #

    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?

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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. ?>
  5. EtherealMirror
    Posted 3 years ago #

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

  6. kakajoe
    Posted 3 years ago #

    thanks...it works for my problem too

  7. telesproperties
    Posted 3 years ago #

    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.


Topic Closed

This topic has been closed to new replies.

About this Topic