Title: Additional index.php With Different Display Options
Last modified: August 19, 2016

---

# Additional index.php With Different Display Options

 *  [myhybridcarcom](https://wordpress.org/support/users/myhybridcarcom/)
 * (@myhybridcarcom)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/additional-indexphp-with-different-display-options/)
 * I’d like to have two versions of index.php, one for my home directory / to serve
   as my homepage and another within my /news/ directory to serve as my blog front
   page. I’ve already followed the Codex instructions for moving (in my case, a 
   copy of) /news/index.php to /. What I’d like to do now—_without changing the 
   way /news/ works_, is to have /index.php:
    1. Show only summaries and
    2. Show only entries from a particular category (“the front page”)
 * Any help would be greatly appreciated. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [stvwlf](https://wordpress.org/support/users/stvwlf/)
 * (@stvwlf)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/additional-indexphp-with-different-display-options/#post-988004)
 * Hi
 * The way you display a summary is to change the_content() to the_excerpt()
 * You need to put a query_posts statement _before the loop_ in your index.php file,
   to limit the display to the single category.
 * You must find the category ID code for your front page category and substitute
   it for cat=3 in my code below
 * `<?php query_posts('cat=3'); ?>`
 * The loop starts with this code:
 *     ```
       <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
       ```
   
 * Within the loop, change this
    `the_content(`
 * to this
    `the_excerpt(`
 * Leave everything on the “`the_content(`” line after the “(” the way it already
   is, just substitute the word excerpt for content
 * That should do it.
 *  Thread Starter [myhybridcarcom](https://wordpress.org/support/users/myhybridcarcom/)
 * (@myhybridcarcom)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/additional-indexphp-with-different-display-options/#post-988123)
 * Perfect, thanks! 🙂
 *  Thread Starter [myhybridcarcom](https://wordpress.org/support/users/myhybridcarcom/)
 * (@myhybridcarcom)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/additional-indexphp-with-different-display-options/#post-988124)
 * [nevermind got it :)]

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Additional index.php With Different Display Options’ is closed to new
replies.

 * 3 replies
 * 2 participants
 * Last reply from: [myhybridcarcom](https://wordpress.org/support/users/myhybridcarcom/)
 * Last activity: [17 years, 3 months ago](https://wordpress.org/support/topic/additional-indexphp-with-different-display-options/#post-988124)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
