WordPress.org

Forums

Stupd question re: pages (4 posts)

  1. amanda1973
    Member
    Posted 9 years ago #

    Where do the php files for 'pages' live? In other words, when I create a page called Hello in the 1.5.2 admin panel, where can I find hello.php on my server?

    Thanks.

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    You can't.
    Everything lives inside the database and WP only goes and finds it then turns it into a page - or a post - when someone asks for it.

  3. amanda1973
    Member
    Posted 9 years ago #

    Thanks, podz!

    I was hoping being able to access a php file would help me answer this question from yesterday. Any advice?

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Contact: tried a plugin ?
    http://ryanduff.net/projects/wp-contactform/

    Your pages.
    There is a bundle of stuff in Codex, but here's the short version:
    What you need to create is a 'page.php'
    You also have to decide if you want people to be able to comment on anything you put on those pages. Let's say you want non-comment page and comment pages.

    Download your 'index.php'
    Now rename it to page.php and upload it back into the same directory.
    When you create a page, it will use that template.
    That template can be edited just like any other, and this one allows comments.

    Now open that 'page.php'
    At the very top, paste this:
    <?php
    /*
    Template Name: No comment page
    */
    ?>

    Then scroll down and remove this code:
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <div class="meta"><?php edit_post_link(); ?></div>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    </div>

    and

    <?php comments_template(); // Get wp-comments.php template ?>

    Save this file as 'page2.php'
    Upload it to where the other file is (which is in the theme directory)

    Now go to create a page
    There will be a dropdown menu which you can choose for each page - comments / no comments.
    Again, you can edit this file as well.

    http://codex.wordpress.org/Pages

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.