• 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!

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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.

    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.

    Thread Starter maestro42

    (@maestro42)

    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

    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

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

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

    I hope it helps!

    ??

    any help on creating seperate pages please !

    To display pages use the new template tag wp_list_pages. For syntax and use go to https://codex.www.ads-software.com/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.

    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:

    https://www.ads-software.com/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?

    https://codex.www.ads-software.com/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.

    Thread Starter maestro42

    (@maestro42)

    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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘create my separate pages’ is closed to new replies.