Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a home.php file which I am using as my home page and it is showing a specific page.

In my index.php I have my main timeline. But when I access this page I get redirected to home.php.

How can I do that? To show my main timeline in a differente path then home. Something like mysite.com/blog

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Rename your home.php template file as front-page.php.

In WordPress parlance, "home" is the Blog Posts Index. The front page of the site is Front Page. Likewise, the home.php template file corresponds to the Blog Posts Index and the front-page.php template file corresponds to the Site Front Page, and the is_home() conditional returns true when on the Blog Posts Index while the is_front_page() conditional returns true when on the Site Front Page.

To summarize:

  • Site Front Page: Front Page, front-page.php, is_front_page()
  • Blog Posts Index: Home, home.php, is_home()

EDIT:

How to setup a static Page as Blog Posts Index:

  1. Create two static Pages, with any arbitrary names (we'll call them "Front Page" and "Blog")
  2. Go to: Dashboard -> Settings -> Reading
  3. Set "Front Page Displays" to "Static Page"
  4. Select "Front Page" in the dropdown for "Front page"
  5. Select "Blog" in the dropdown for "Posts page"

Now (assuming you have configured pretty permalinks at Dashboard -> Settings -> Permalinks):

  • Front Page URL: www.example.com
  • Blog Posts Index URL: www.example.com/blog/
share|improve this answer
    
Thanks, and how would I access the blog posts index page? I mean the url? –  VinTem Jun 10 '11 at 18:22
    
See the edit/update to my answer, above. –  Chip Bennett Jun 10 '11 at 18:28
    
awesome! thanks. –  VinTem Jun 10 '11 at 18:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.