Static pages, plus blog - how best to achieve? (10 posts)

  1. KarenD
    Posted 12 years ago #

    I'm just getting started with WordPress. I was hoping someone who knows more about it would answer this question, because I want to do something similar with my journal. The solution I've settled on for now is two installations of WP: one for my entries and one for my semi-static pages. This seemed like the easiest way to get archives for just the entries as well as simpler permalinks for the semi-static pages. I haven't loaded much content yet but it seems like it will work nicely.

  2. Lester Chan
    Posted 12 years ago #

    I have one page that will create static pages through a URL. If that interest you, give me a note =)

  3. sammyrae
    Posted 12 years ago #

    Sorry to not give an answer–just another person who'd really like to know how to do this. I've read a few articles on how to do it with Movable Type, but would really like to know how to do it in WordPress. The valid XHTML and CSS is appealing, and I've gotta say this site looks darn good.
    I want to be able to edit the static content from within WordPress—not just get content from a static file.
    Any help would be appreciated.

  4. KAShirow
    Posted 12 years ago #

    Here's how I did essentially the same:
    In wp-blog-header.php:
    $wpvarstoreset = array(....blah...); is the array of variables the blog reads in. Add one of yours in this list, I named it 'mode'.
    In index.php, right after <div id=content>
    switch ($mode) {
    case "about": include ('aboutme.php'); break;
    case "locate": include ('locate.php'); break;
    This makes the blog populate the main content area with whatever you include instead of the actual blog entries. To make it actually arrive at these with nice urls, I added this to .htaccess:
    RewriteRule ^about/$ /index.php?mode=about
    RewriteRule ^locate/$ /index.php?mode=locate
    This causes http://www.myblog.blah/about to call index.php with $mode=about and return the about page, which is the way I like my static content. There are probably other ways, however, this one seems most obvious to me.

  5. Mary Linville
    Posted 12 years ago #

    Hey, that just gave me an idea. True static pages can't be generated, but that doesn't mean we couldn't make it look like they were.
    What IF we did something like this:
    we create a category called "static pages" or whatever.
    Create our pages, then use modrewrite like KAShirow mentioned for each page? Of course, that would require seeing what the actual url to each" static" page was, but I think that's a nice solution for those of us with small sites, that don't want a complicated CMS just so we don't have to FTP all the time.
    Think that'd work/be a good idea?

  6. sindas
    Posted 12 years ago #

    I need help!
    <div id="content">
    <?php switch ($static) {
    case "biography": include ('biography.php'); break;
    case "contact": include ('contact.php'); break;
    case "shows": include ('shows.php'); break;
    case "photos": include ('photos.php'); break;
    dosnt work for me, gives me 404 errors, what am I doing wrong?

  7. TechGnome
    Posted 12 years ago #

    HAve any of you checked out this thread? http://wordpress.org/support/10/2523 I'll be posting the shell I use and step-by-step instructions later today.

  8. TechGnome
    Posted 12 years ago #

    Hmmm.... OK, a quick look at your site revealed what I need to know.
    Your .htaccess file should look like this.
    RewriteEngine On
    RewriteBase /
    RewriteRule ^photos/$ /index.php?mode=photos
    See if that helps. Those first two lines are probably missing.
    I think the assumption had been that you had the userfriendly urls already going.
    Since you are using the modrewrite for this anyways, you might want to think about turning it on for your permalinks too.

  9. Matt Mullenweg
    Posted 12 years ago #

    Why not include wp-config.php, keep the dynamic menu, and use Links for running your site menu system? That's what I'm doing.

  10. TechGnome
    Posted 12 years ago #

    Eh? wp-config.php should be included.... doesn't it get included as part of wp-blog-header.php? And not all of my menu is dynamic. I have hard links in there too, as well as informational items. And using the Links to link back to pages on your own site seems hoaky. But that might be me.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.