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.
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...
yogaboat
Member
Posted 8 years ago #
If you're asking how to use a static page as your home page (instead of the default blog homepage) this might help:
http://codex.wordpress.org/Pages#Using_a_Page_as_the_Front_Page
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 > http://codex.wordpress.org/Template_Hierarchy )
Hmm...what loop? In the index.php file, the only code is:
<?php
/* Short and sweet */
define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
?>
nothing else...
I meant in the index.php file of the THEME that you are using :)
(wp-content/themes/deafult/index.php)
Nevermind I got it - you meant index.php in my THEME folder. Thanks.