I started using home.php because I wanted to have a static front page. I want to link to my blog from my front page and cannot figure out how to do so. Have I broken this functionality?
I started using home.php because I wanted to have a static front page. I want to link to my blog from my front page and cannot figure out how to do so. Have I broken this functionality?
All your archive and category links and whatnot should still work. But these days we usually recommend creating a Page (Write > Write Page) to use as your 'home' page, then assign it under Options > Reading, Front Page. Note you can set a 'Posts page' as well through this (which would behave as a normal blog front page does displaying recent posts).
Ok. I know how to do that but I couldn't seem to customize the php like I wanted to. In my home.php I run:
<p style="margin: 5px; float: right"><table align="right"><tr valign="top"><td><h2>Latest Articles</h2>
to show my latest post titles. When I paste this code into a 'page' it doesn't work. I assume this is a security feature.
Is there a way to put php into a 'page' post without it being a security issue? If not, how can I replicate the functionality I have listed above?
Thanks!
Most likely you want this:
http://www.transycan.net/blogtest/2007/09/10/static-frontpage-combined-with-dynamic-content/
We're almost there. I have the homepage working from a new page template. I was able to integrate the code I wanted and I have the 'blog' assigned to a different page and that works as well.
My only problem left is a formatting issue. If you go to http://www.johncall.com you'll see my 'Latest Articles' integrated with the home page text. However instead of being in a nice little area of it's own the text is intruding a little bit. This didn't happen before. Any ideas?
Thanks for all the help so far!
I just figured it out. The function <?php get_archives('postbypost', 5); ?> puts each line in a
<li> and I didn't have the surrounding
<ul> tags. Figured they were included.
Thanks!
Don't post code without highlighting it and hitting the "code" quicktag!
Will do on the "code" quicktag.
This topic has been closed to new replies.