How do I copy a page.php on my wordpress site

3 replies
  • WEB DESIGN
  • |
Hi someone

I need to make a copy of my page.php in my wordpress site because I have loaded a simplepress.forum to my site and I want to have it so that it loads on a separate page and one of the first instructions is to make a copy of this template.

I am very much techie newbie and am very willing to give things a go but I am stumped with this. I have a little idea of what I might need to do but not really

These are the instructions:

Step 1: Create the Template File
In your theme folder (/wp-content/themes/themename/) there is a file called page.php which is the template that WordPress uses to display 'pages'. Step 1 is to make a duplicate of this file with a different name. For this example I will assume you are making the new template to display my forum plugin so a good name for the new template might well be forum.php

Any help would be appreciated

Cheers
Misty
#copy #pagephp #site #wordpress
  • Profile picture of the author e-mail2u
    Misty you have a couple of options available.

    1. Upload this file again and rename using your ftp client once uploaded.

    2. Open the file up on your desktop using a editor and the save using the save as.

    There are more options but those two are the easiest to do..
    {{ DiscussionBoard.errors[55253].message }}
    • Profile picture of the author mistyone
      Originally Posted by e-mail2u View Post


      2. Open the file up on your desktop using a editor and the save using the save as.
      Hi e-mail2u

      To do step two, do I copy the page.php and paste onto a notepad document and save it as forum.php and then upload using my FTP client into the themes folder in my wordpress site?

      If this is the procedure I follow, what happens about the text that is already on it? The next instruction is:

      Step 2: The New Template Identifier
      Step 2 requires that the new template file be opened for editing. Every custom template that is created requires a special identifier at the top. Note that the default templates supplied with the theme do not need this. Open the newly created forum.php template file for editing and add the following lines of code at the very top:

      <?php
      /*
      Template Name: forum.php
      */
      ?>

      Please note that the opening php tag above (<?php) must be on the very top line of the file. There can be no blank lines before it or it will not work. Replace the name of the template with whatever name you have chosen.

      Will this take care of the information that has been already added to the original text that has been added by my adding stuff to the site?

      Sorry for what may appear to be stupid questions

      Cheers
      Misty
      {{ DiscussionBoard.errors[55297].message }}

Trending Topics