WordPress.org

Ready to get started?Download WordPress

Forums

create my separate pages (11 posts)

  1. maestro42
    Member
    Posted 9 years ago #

    for some reason i am trying to make separate pages and they aren't working. i want to have a contactus.php, aboutus.php etc... however i copied my index.php file and then renamed it but i don't know where to put the file ? where in the wp-file structure should it be ? thanks!

  2. Kafkaesqui

    Posted 9 years ago #

    Is this 1.5? If it's the index.php from a theme, you'll first want to make sure this is at the top of each:

    <?php require('./wp-blog-header.php'); ?>

    Then place them in your blog's root directory.

  3. Tahongawaka
    Member
    Posted 9 years ago #

    If you are using 1.5, all you need to do (in most cases) is go to the Write Pages part of your dashboard & write away. If you're using the permalink structure, after you create the page you'll have to update the permalinks, but it will be worth it. If you want a template for it, copy the index.php in your theme directory to pages.php and gut "The Loop." There are details in the codex, but it appears to be down right now.

    My Loop looks like this in pages.php:
    <?php if (have_posts()) : while (have_posts()) : the_post();?>
    <div class="post">
    <h2 id="post-<?php the_ID(); ?>"><?php the_title();?></h2>
    <div class="entrytext">
    <?php the_content('<p class="serif">Read the rest of this page
    &raquo;</p>'); ?>
    </div>
    </div>
    <?php endwhile; endif; ?>

    In most cases, this would be better than creating pages in your root directory, as they would be updated with your themes.

  4. maestro42
    Member
    Posted 9 years ago #

    thanks ! i forgot to add the require blog header line to my page - works perfectly now - and i won't have have to modify it separatly - bc it still pulls the sidebar.php footer.php header.php etc... sweet

  5. gingerbeer2000
    Member
    Posted 9 years ago #

    i would like to know how to make more pages but i dont know how to could you please explain how i can make another page which is also included within my kubrick blog theme ?

    Thanks

  6. gingerbeer2000
    Member
    Posted 9 years ago #

    I tried the <?php require('./wp-blog-header.php'); ?> but i get a blank page ?

  7. dubbldawg
    Member
    Posted 9 years ago #

    I like how 13 different people chime in with different ways so that you are thoroughly confused.

    I hope it helps!

    :P

  8. gingerbeer2000
    Member
    Posted 9 years ago #

    any help on creating seperate pages please !

  9. lt
    Member
    Posted 9 years ago #

    To display pages use the new template tag wp_list_pages. For syntax and use go to http://codex.wordpress.org/Template_Tags/wp_list_pages
    BTW I'm still in WP and I'm trying to find my way around but I think it would very useful if pages could be assigned to categories. Rant: I find very annoying the lack of a basic, structured documentation for the newbies. I do not understand why so many people spend their precious time in building plugins, instead of writing a simple manual of things work.

  10. Kafkaesqui

    Posted 9 years ago #

    gingerbeer: The following gives an example of a simple *static* page that still uses the current template elements, i.e. header and footer php files:

    http://wordpress.org/support/topic.php?id=23974#post-135568

    Note that a file like this would typically reside in the root blog directory (where wp-blog-header.php is located).

    It: "Rant: I find very annoying the lack of a basic, structured documentation for the newbies. I do not understand why so many people spend their precious time in building plugins, instead of writing a simple manual of things work."

    You mean like this?

    http://codex.wordpress.org/Pages

    WordPress documentation is created by people just like you: WordPress users. If you believe it's lacking, please join us and pitch in, in any way you can. We can always use the help.

  11. maestro42
    Member
    Posted 9 years ago #

    all i did was to make a copy of my index.php file found in the default template theme folder. - then i renamed it to what i wanted. i added this line at the top :

    <?php require('./wp-blog-header.php'); ?>

    Then i moved the file into the root directory where wp is installed ( with all the wp-content, wp-admin, wp-images folders etc)

    then i just called it in my browser and it works fine - eliminate the stuff in The Loop - and place my content there instead

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.