Support » Fixing WordPress » Static content on home page only in 1.5?

  • Hi, I want to put some static content on my home page ONLY, I’m using 1.5. It seems that the page template (wp-content/themes/default/page.php) controls ALL pages. Is there a way to wrap this in some conditional to make it show up?

    Also, in the admin in FireFox and IE the template view shows up below the the navigation on the right side, be nice if this could be fixed.

Viewing 10 replies - 1 through 10 (of 10 total)
  • That’s incorrect. Actually, home.php is higher in the template hierachy so if you want a static homepage, just add your code in wp-content/themes/YOUR_THEME/home.php

    My theme is default at the moment, so…isn’t that the same page?

    Oops, fixed the type. I meant home.php:-) Note that default doesn’t currently contain a home.php file.

    Ok, not quite following you because there are only two themes installed with 1.5 – default and classic. Neither folder has a home.php. I’ve not built my own theme yet and I’m not sure I will either – I’ll probably just tweak default.

    So do I *add* a page called home.php and the content is picked up? Or am I missing something…

    If you’re asking how to use a static page as your home page (instead of the default blog homepage) this might help:

    No, that’s not what I’m asking actually. The default home page is just fine, but I want to put a *static piece of content* on that page. But page.php handles ALL pages seemingly. If I put it on that page it will show up on EVERY page, which I do not want.

    Put your text before the loop in the index.php file.
    Warning: if you don’t have single.php, archives.php etc. it will appear in all instances when index.php is called to display content (see Template Hierarchy in Codex > )

    Hmm…what loop? In the index.php file, the only code is:

    /* Short and sweet */
    define(‘WP_USE_THEMES’, true);

    nothing else…

    I meant in the index.php file of the THEME that you are using 🙂

    Nevermind I got it – you meant index.php in my THEME folder. Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Static content on home page only in 1.5?’ is closed to new replies.