WordPress.org

Support

Support » How-To and Troubleshooting » How do I only show summary on front page?

How do I only show summary on front page?

  • Hello,

    I have a quick question, how do I customise WP so it only displays summary of the post on the front page? Currently WP is displaying full post on the front page.

    I was hoping to find a setting for this in the ‘settings’ section of the admin control panel but could not find one.

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • hi

    in /wp-content/themes/{themename}/index.php find this

    the_content('... stuff is here ...');

    change it to this
    the_excerpt();

    (changing index.php assumes you are not using a static page as your front page)

    Thanks for this.

    I will make the change and see how I go.

    Is there a way of controlling how many lines of excerpt I would like to display?

    Is there a way of controlling how many lines of excerpt I would like to display?

    Yes. I just answered a similar question in another thread here.

    Great. Thanks.

    I did not find this code, the_content(‘… stuff is here …’);

    But I found this code here,
    </div>
    <?php endif; ?>
    <div class=”art-PostContent”>
    <?php if (is_search()) the_excerpt(); else the_content(__(‘Read the rest of this entry »’, ‘kubrick’)); ?>

    When I changed it to this,

    </div>
    <div class=”art-PostContent”>
    <?php the_excerpt(__(‘(moreā€¦)’)); ?>
    it did not work.

    What is your opinion on this code?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I only show summary on front page?’ is closed to new replies.
Skip to toolbar