WordPress.org

Forums

How to? Make a static page... (16 posts)

  1. matius
    Member
    Posted 11 years ago #

    I would like to have about 5 or 6 static pages on my site. If I were to modify the index.php file to make those other pages...and then incorporated mod_rewrite...would the rewrite function work on those pages as well? Does rewrite affect the whole site no matter what?
    Basically, I'm just trying to figure out how to work those static pages in and still have everything work.

  2. matius
    Member
    Posted 11 years ago #

  3. matius
    Member
    Posted 11 years ago #

    Well, before I start gutting and cutting...
    If I remove the posting function from index.php and make it my static template...and I create about 5 static pages (about, info, contact, etc...)
    ...will mod_rewrite still work once it is enacted?
    Thanks for your help!

  4. davidchait
    Member
    Posted 11 years ago #

    Actually, the better approach is to make a static category if it's not really 'customized' pages but just static 'seeming' content. Have embedded direct links on the homepage to your static content, and have the CSS make it look different. I've talked about this before in the forums if you search... and it's how I do the About section for my own website.
    -d
    CHAITGEAR

  5. matius
    Member
    Posted 11 years ago #

    You think that's the better way to do it? I've been searching the forums but couldn't find any posts where you were speaking on this (just put in your name to search posters).
    Is there a way to make a category invisible so that there is not a 'static' section under 'general'. Lastly, mod_rewrite would still work right? I noticed you do not have rewrite in effect...

  6. AndySocial
    Member
    Posted 11 years ago #

    Maybe I'm dense, but why not just make static HTML pages and add the code to the index.php file as straight HTML? Why go through such complicated machinations to have content in the SQL database which is not "really" part of the blog (i.e., no comments, etc.)?

  7. davidchait
    Member
    Posted 11 years ago #

    Because it IS part of the overall site content. By making it 'static posts' in the blog, you get:
    - full support for any changes in style/template
    - full access via web to tweak/update changes live
    - all content is in the DB, simple to backup.
    -d

  8. Stevarino
    Member
    Posted 11 years ago #

    I'm actually working on a *cough*second*cough* static pages hack, but no promises when it will be done. ;)

  9. clay
    Member
    Posted 11 years ago #

    If you look at the resume page on my site you will see what I did for static pages which use the same template and CSS as my journal.
    I stripped index.php of the 'content' section and seperated it into header and footer files, then just use php includes for the html pages.

  10. andrew_h
    Member
    Posted 11 years ago #

    Using single post categories instead of hacking static pages makes great sense to me but is there any limit on category numbers that would suggest using this technique only in moderation?
    Andrew

  11. Anonymous
    Unregistered
    Posted 11 years ago #

    Quoted:
    I stripped index.php of the 'content' section and seperated it into header and footer files, then just use php includes for the html pages.
    But did this affect the style switching?

  12. clay
    Member
    Posted 11 years ago #

    Quoted:
    I stripped index.php of the 'content' section and seperated it into header and footer files, then just use php includes for the html pages.
    But did this affect the style switching?
    No, all I did was remove the part of index.php which parses and displays post content. You can check it out on my site. If you change styles while on the resume page(the static page) it brings you back to the journal index, that is the only thing. But I don't think it matters.

  13. matius
    Member
    Posted 11 years ago #

    Clay, you just wrote a function to switch the includes in and out?
    That's what I was going to do originally, but then really like the idea of having the ability to edit those HTML pages from anywhere...

  14. clay
    Member
    Posted 11 years ago #

    Matius, I'm not sure what you mean by switching the includes in or out..
    I just set up a header and a footer file, and then my resume.php file looks like this:
    include ('header.php')
    include ('resume.html')
    include ('footer.php')
    Thats basically it

  15. anatman
    Member
    Posted 11 years ago #

    There is a way to keep a category from showing in your category list, using a parameter in the function list_cats() or wp_list_cats(), it is described in the wiki. But i tried to use the parameter to no results.
    Anyone knows if it works or if it's broken?

  16. aguafuertes
    Member
    Posted 11 years ago #

    Hi anatam,
    I tried to hide some categories as well (children=false), but they are still displayed, in another way, though...
    Can anybody confirm/explain this?
    Thanks
    Gregor

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.