WordPress.org

Ready to get started?Download WordPress

Forums

How do I only show summary on front page? (6 posts)

  1. iceman2008
    Member
    Posted 5 years ago #

    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.

  2. stvwlf
    Member
    Posted 5 years ago #

    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)

  3. iceman2008
    Member
    Posted 5 years ago #

    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?

  4. Len
    Member
    Posted 5 years ago #

    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.

  5. iceman2008
    Member
    Posted 5 years ago #

    Great. Thanks.

  6. Pankas
    Member
    Posted 4 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags