0

I'd like to have a static home page and also have a link called "Blog" that lists posts in the "blog" category in chronological order.

Would the best way to do this just be to place code in archive.php and do a "switch case" on the category and do a loop on the posts?

Just looking for some options before I decide on a strategy and code the solution.

1
  • 213 questions...10 answers. Impressive.
    – anu
    Commented May 9, 2011 at 13:45

1 Answer 1

4

wp dashboard > 'Page' > add new > name it 'Home', publish

wp dashboard > 'Page' > add new > name it 'Blog', publish

wp dashboard > Reading Settings > 'Front page displays' select 'a static page' set 'Front page' to 'Home' page that you have added > set 'Posts page' to 'Blog' page that you should have added.

It doesn't seem like you need to create a 'Blog' category. Just let your new 'Blog' page display the posts loop, which will be your index.php theme file.

2
  • 1
    Absolutely correct. I'll just add: if you want to customize the the display of either the Front Page or the Blog Posts Index, create/modify front-page.php for the Front Page, and home.php for the Blog Posts Index. Commented May 4, 2011 at 3:33
  • Thanks for the help. I'll be doing it a bit differently (via script) but this helps clear up some questions I had about the default setup.
    – Scott B
    Commented May 5, 2011 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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