agentlion All American 13936 Posts user info edit post |
ok, check out this hella-ungraceful solution I figured out while doing this site - http://nickywangsgard.com/
That entire site is managed in WP, including the static pages (profile, links), the front News page (the "news" category from the blog) and the Blog. An easy, half-solution to your problem is to install wordpress in a "blog" directory, then put index.php in the root. But the problem there is that all your permanent pages (except for the front page) would be prefixed by "/blog/", like yoursite.com/blog/page1.
So to make it appear that there is a "blog" directory, do this: First, the Wordpress files are installed in the root directory, as normal. From there, you can use the home.php option to create a different front page (i.e. put a home.php file in your theme directory. That file will be used for accesses to your root directory at yoursite.com)
Then make your static pages and give them slugs, so they will show up as yoursite.com/page1, yoursite.com/page2, etc.
Now here is the magic (and the major hack). If you attempt to access a file or directory through your browser that is non existant, Wordpress will default to index.php, which is where your blog information is stored. Therefore, if you don't have a 'blog' directory in your root, but then you attempt to access yoursite.com/blog, Wordpress will default to your blog!!, not home.php. So you make some links to yoursite.com/blog, your visitors use those links, and they're none the wiser to what's actually going on. To complete the illusion, go into your Wordpress options and go to "Permalinks". Use the 'Custom Structure', and use something like "/blog/%post_id%", or "/blog/%what%ever%options%you%want%". This way, the permalinks to all yoru blog posts will also show up as yoursite.com/blog/blogpost1
If you're paying attention, you'll realize that all other mistyped URLs will go to your blog too, like yoursite.com/blogs, yoursite.com/bolgs, and yoursite.com/abcdefg That's not really any of yoru concern. As long as your intra-site links are correct, users will have no idea what's happening behind the scenes.
Be aware that I have no idea if this is intended behavior in Wordpress, or maybe something they'll fix/change in future versions. It seems reasonable, but the argument could me made that nonexistant URLs should be redirected to home.php if one exists, not index.php, which is what this hack is relying on. Also be sure to document what you're doing in the style.css or a README or something, or else you will forget. Just 1 week after I made that site above, I went back and completely confused myself beause i couldn't find the 'blog' directory, which i was sure was there because that's what the URL said!
.... so give it a shot and see how it works. 5/30/2006 4:00:08 PM |