thinsoldier
Member
Posted 1 year ago #
Lets say my site is http://www.myblog.com
I would like:
http://www.mysite.com shows a hand coded welcome message, a photo, and a list of categories (no articles displayed on the home page at all (for the moment) )
and
http://www.mysite.com/news/ lists all the articles (behaves like the default wordpress homepage)
So far I've found that adding a home.php file to my theme overrides the index.php and lets me do the first bit of what I want. But I haven't found how to get the behaviour of index.php to happen when I visit mysite.com/news
You want a Static Home Page: http://codex.wordpress.org/Creating_a_Static_Front_Page
You want to make a page TEMPLATE with your old index.php stuff in there (call it like news.php)
http://codex.wordpress.org/Pages#Page_Templates
Then make a PAGE called news and point that to the template :)
thinsoldier
Member
Posted 1 year ago #
Thanks, that worked perfectly.
thinsoldier
Member
Posted 1 year ago #
Sorry, it did not work perfectly after all.
I created a page in the system named News.
I created a template by duplicating the default template's index.php and renaming it news.php
I added the comment <? //Template Name: NewsRoot ?> to news.php
I edited the News Page in the sytem.
The template "NewsRoot" is now available as an option.
I set the News Page to use the NewsRoot template.
Now when I go to mysite.com/news I no longer get the 404.
However, no blog posts show up within the main loop of the news.php template file. Any other markup in the file renders as expected but there's nothing showing up within the main loop. Why might that be?
thinsoldier
Member
Posted 1 year ago #
Nevermind.
Part 2 of the solution:
http://en.support.wordpress.com/pages/front-page/#video
(video at the bottom of the page)