Want to show Excerpt rather than full posts on home page

  • Author
  • #949022


    Hi all,

    I want to show excerpts rather than full posts on my home page. I searched the forum and most of the people say you need to change the_content(); with the_excerpt(); in your index.php file. Well, I checked that file but could not find any of these functions. Below I have placed all the code from my theme’s index.php file so please anyone can suggest what changes should I made in the following code.

    <?php global $theme; get_header(); ?>

    <div id=”main”>

    <?php $theme->hook(‘main_before’); ?>

    <div id=”content”>

    <?php $theme->hook(‘content_before’); ?>

    if (have_posts()) : while (have_posts()) : the_post();
    * The default post formatting from the post.php template file will be used.
    * If you want to customize the post formatting for your homepage:
    * – Create a new file: post-homepage.php
    * – Copy/Paste the content of post.php to post-homepage.php
    * – Edit and customize the post-homepage.php file for your needs.
    * Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part

    get_template_part(‘post’, ‘homepage’);


    else :
    get_template_part(‘post’, ‘noresults’);


    <?php $theme->hook(‘content_after’); ?>

    </div><!– #content –>

    <?php get_sidebars(); ?>

    <?php $theme->hook(‘main_after’); ?>

    </div><!– #main –>

    <?php get_footer(); ?>

    Other than this, I also want to know how I can check my post ids. I need post ids to set them as featured posts(the theme asks for post ids). So, please anyone can suggest something for this as well.

    Thanks in advance for your help and I look forward to your replies.



    You did not specify a blog address or reason for posting when you created this topic.

    This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.

    If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.

    This is an automated message.

The topic ‘Want to show Excerpt rather than full posts on home page’ is closed to new replies.