Support » Fixing WordPress » Non-static frontpage with separate blogpage?

  • I’m using WP (2.0.1) as a CMS. I have a frontpage (home.php) which shows excerpts of the 3 most recent posts, and a newspage (i.e. the blogpage, news.php) which shows excerpts of the 10 most recent posts.

    Problem is that WP thinks home.php and news.php are the same (except for the layout). For instance, I use some ‘if this is home, then..’ statements, and things show up on both pages.
    I think I can fix it by using a static frontpage plugin, but that would mean I can’t show excerpts anymore on home.php, because I’d have to make home.php a Page, am I right?

    So how can I set home.php as a frontpage with The_Loop (at http://www.domain.tld), and at the same time have a blogpage/more extensive newspage (at http://www.domain.tld/news/) with The_Loop that isn’t showing things that are only meant for the frontpage?

    (Note: looks related, but I’m not sure.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • After using another plugin for setting the frontpage and some fiddling, it appears I solved it. How I solved it:

    1) Create a template for your blogpage which contains the posts, and a template for your frontpage. Use The_Loop to show the_content or the_excerpt.
    2) Give those templates a name inside the template-file (e.g. <?php /* Template Name: Home */ ?>), so you can select it in WP-admin template selectboxes.
    3) Create a Page for your blogpage and another Page called home.php, and point to the templates you just made. Although you made home a Page, it doesn’t matter if you used The_Loop in your home template, it should work regardless. Your frontpage needn’t be a static frontpage for the following frontpage plugin to work.
    4) Install Filosofo Home-Page Control,
    5) In your admin panel, go to Options > Home-Page Control.
    6) Set the Home-Page Page to the template you want as frontpage (in this case, ‘Home’). Do not use ‘WP-default’. Leave ‘blog directory’ blank.

    That worked for me. I now have a non-static frontpage a couple excerpts, and a another page that looks like a blog(front)page, containing a lot more excerpts. Hope this might be useful to other people aswell.

    Hi Funkphenomenon, I’m having a similar problem but slightly different. I want my Home page to be different from the other pages (ie when you click “previous” and “next”) but resume working as an Index page when these are clicked. I have a thread open which clarifies this:
    Can you help?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Non-static frontpage with separate blogpage?’ is closed to new replies.