Title: home.php / index.php problem&#8230;
Last modified: August 18, 2016

---

# home.php / index.php problem…

 *  [ryang](https://wordpress.org/support/users/ryang/)
 * (@ryang)
 * [21 years ago](https://wordpress.org/support/topic/homephp-indexphp-problem/)
 * Hi.
    I am trying to help out a co-worker with his blog. I have set up a home.
   php it the theme dir as the splash page that will display only the latest posting.
   The problem is, I can never get the regular index.php to display, with the 5 
   latest postings (as setup in wp-admin). I have temporarily put a link at the 
   bottom of home.php that links to the latest monthly archive to make a temp fix,
   but I would rather it link to the standard index.php with all the latest posts.
   I am assuming i would have it link to [http://www.chadsreviews.com/index.php](http://www.chadsreviews.com/index.php),
   but maybe it is supposed to be something different? I have read some of the similar
   topics, but don’t quite know why I can’t get it to work. Is the problem perhaps
   that my site is at the root and not in a /wp dir or something? Any help is very
   much appreciated. Here is the site: [http://www.chadsreviews.com](http://www.chadsreviews.com)(
   this would get you the home.php) What I need is to know how to get to the standard
   index.php from that page.
 * Thanks!

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

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years ago](https://wordpress.org/support/topic/homephp-indexphp-problem/#post-207669)
 * In a sense you’re trying to create two separate home pages, and that’s not possible(
   at least, not through the steps you’re trying to take). The thing about template
   hierarchy with 1.5 themes is that index.php has taken on a secondary or backup
   role to all the other query-type (main) templates. When it exists, home.php is
   effectively the *default* page for a blog, and there’s no ability to override
   this.
 * What I’d recommend–in either home.php or index.php–is to use a bit of PHP to 
   verify if there’s no query-string in the url (i.e. one is at the very top of 
   the blog), and switch between the *home* and *index* components or views of your
   home page. So you could start off by placing this before the home-related content:
 * `<?php if($_SERVER['QUERY_STRING']) : ?>`
 * At the end of “home” it’s a simple:
 * `<?php else : ?>`
 * followed by the index-related features, and finally closing with:
 * `<?php endif: ?>`
 *  [mrtagomi](https://wordpress.org/support/users/mrtagomi/)
 * (@mrtagomi)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/homephp-indexphp-problem/#post-208153)
 * I’m using that and it works fine… now how can I determine if a page is a [http://www.mypage.com/?cat=whatever](http://www.mypage.com/?cat=whatever)
   page?
 * also, if I want to first check if it’s my index.php page, and then check if it’s
   a /?cat=whatever type page, can I use a ‘switch/case’ function instead of an ‘
   if/else’ function? how do I write that in code?

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

The topic ‘home.php / index.php problem…’ is closed to new replies.

## Tags

 * [home.php](https://wordpress.org/support/topic-tag/home-php/)
 * [splash](https://wordpress.org/support/topic-tag/splash/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [mrtagomi](https://wordpress.org/support/users/mrtagomi/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/homephp-indexphp-problem/#post-208153)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
