heh that’s pretty weird, take a look at the pages.php file in both themes and compare the two?
Ok,
I was a little hasty. One page works in the Default theme – any I have created since don’t work in the Default theme – they cause a 404.
So, to re-cap, the problem I am having is that when I create Pages, and try to access them from the Pages menu, they 404.
Anyone had anything like this?
Thanks,
Tom
Here is my solution :
1. Copy page.php -> home.php
2. Add query_posts("page_id=2"); (where page_id is your page) before the Loop
3. Copy index.php -> news.php and add at the top
<?php
/*
Template Name: News
*/
?>
And add query_posts("showposts=10"); before the Loop
4. Make a page named News and assign template News to it
All works fine, i think. At least for me. And all pages in sidebar lists automatically.
Thanks for the response Docker
I tried that but unfortunately the News page 404’s when I try to access it!
🙁
Tom
Hmm, can’t say what’s wrong, i’m not guru in php
Did the page “News” listed in pages list ?
First 2 steps makes the static page your home page. Is it works ?
Next 2 steps assigns template to your page (name is not important – News, Blog, bla bla bla) wich can contain whatever – the posts re-query from database with your argumens (“showposts=10” in this case)
May be it helps to you.
oh, and i did not install ryan’s plugin
my permalink structure is /%category%/%post%/
and i didn’t change blog address
Hi Docker,
thanks for the response.
Yes the news pageis listed in the Pages list – unfortunately clicking on it causes a 404!
I completed steps 1 and 2 but I’m not sure if it worked! I don’t think it is. I added some spurious text to home.php and it isn’t showing up on the home page.
I followed 1 and 2 precisely as you laid them out so I’m not sure why it is not working. Is it because I’m using Ryans Page To Front plugin, perhaps?
Tom
Yes, disable plugin, because when it’s working, it’s using page.php instead home.php
Next, check yor preferences, may be you changed the permalink structure and blog address and wordpress address in Options, i have both “http://mysite”
Docker,
you are a star!
That worked a treat – I have no idea why(!) but the site is now working as expected.
Thank you, thank you, thank you.
Tom
Just resloved what this problem have another simple solution :
http://codex.wordpress.org/Pages#Using_a_Page_as_the_Front_Page
Just install Ryan’s plugin and make a page with Archives template 😉
Sorry?
You lost me docker.
What is the advantage of doing that over the method I have now?
Thanks,
Tom
i just rounding there about this topic and find some parallel threads.
I think the last have no advantages, my method have a points :
1. you can style your homepage as you want
2. you get a news page already styled like usual blog (by copying index.php you copy all stuff)
Abd you don’t need change permalinks and other thing.
🙂 i just reflect on all this (this is my first post and i little bit verbose 🙂
and sorry for my english, i m from Uzbekistan
Docker,
thanks for all the help and there is absolutely no need to apologise for your English – I understood you well enough to fix my site following your instructions and you can be sure your English is much better than my Uzbek, Russian, or Tajik!
Cheers,
Tom
You could also create a home.php and then use mydomain.com/home.php as startpage and mydomain.com/index.php for blogging.
I have a full on write up of using WordPress as a CMS at http://tinyurl.com/ydo5w5 – but there’s a plugin that pretty much does everything that you’re looking for here: http://www.ilfilosofo.com/blog/home-page-control/
No?