• Resolved altstatten

    (@altstatten)


    The theme I’m using has only one file for posts and pages, the index.php file.

    I want separate files for each, one for posts and one for pages so that I can format them differently.

    1. How do I create those separate files and get wp to recognize them when I draft something?

    2. Any easy way to go back and “re-assign” the new files to old posts and pages (to adopt any updated formatting)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • moshu

    (@moshu)

    Thread Starter altstatten

    (@altstatten)

    That did the trick for the Pages. I applied this:

    The files defining each Page Template are found in your Themes directory. To create a new Template for a Page you must create a file. Let’s call our first Page Template for our Page snarfer.php. At the top of the snarfer.php file, put the following:
    <?php
    /*
    Template Name: Snarfer
    */
    ?>

    Is there an equivalent procedure for POSTS??

    moshu

    (@moshu)

    Yes, it is in the first link I gave. It is called “single.php”.
    (I hate when people don’t read the provided resources)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Separate Post and Page Files??’ is closed to new replies.