Ready to get started?Download WordPress


Pages in WordPress (7 posts)

  1. Anonymous
    Posted 10 years ago #

    This may be a stupid question, but how in the world to you make extra pages in WordPress? I've looked everywhere and there seems no simple way to do it. I mean like an "/about", "/coding" "/contact" etc pages. Do you have to do this through PHP or something?
    Thanks for any help anyone can offer on this subject.

  2. unixman
    Posted 10 years ago #

    Yes, you made them yourself. You could copy the index.php and use it as a skeleton to create other "static" pages.

  3. unoamigo
    Posted 10 years ago #

    I see another good tutorial for someone to write. Creating pages using the RewriteEngine and the existing index page.
    <!--- blank line -->
    However, for intro users, it's probably best to simply duplicate your index.php file.

  4. Anonymous
    Posted 10 years ago #

    Thanks everyone for the replies!!
    Hmm. That method requires you to change each area every time you want to change your overall look. Maybe a better way to go would be "index.php?section=about"

  5. Anonymous
    Posted 10 years ago #

    You could very well do that. I did that with a php file to make static page popups, but I didn't use the index.php to do it. Instead, I learned a little PHP and did it myself. You can view the source code or see it in action or go to my main page, and on the menu in the main section in the links category "TI-Org", click each of the links.

  6. davidchait
    Posted 10 years ago #

    I used a different method. I define categories that I will call static in usage terms, and I modified wp-blog-header.php right after the $wpvarstoreset big loop with something like:

    if ($cat==11) // the ABOUT cat
    $staticSection = true;

    I then modify the template to not output a link for posts in a static section. I've done further hacks to allow both static and non-static posts in a given category using the sticky-posts tagging so that sticky posts look static, but non-sticky are just links -- within a $staticSection category page.
    If you look at my about page, you'll get the idea.
    Of course, you can restrict yourself to a single post in each category if you want. But this way, all the static page data is still posts in the DB, with all the formatting capabilities, and any changes to the overall template will obviously apply to them like any other page.
    If you do want customizable styles, add another [div] wrapper around the [div "content"], when $staticSection is true -- give it a class name you like ([div class="staticcontent"] or something), and then you can override/subclass styles in the CSS to make the static content look slightly different.

  7. Zaaba
    Posted 10 years ago #

    If it's pseudo static pages you want, take a look at this post:
    It's pretty detailed as in the different workarounds for generating static pages which are in fact, WP posts albeit under "secret" catagories :)
    Someone should document this! Hee hee...

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.