How to add template to theme in WP

I’ve very new to WP and I’m trying to setup a new page which displays only a specific category through the WP admin section.

I’ve downloaded the ACE plugin and I’ve managed to filter out posts with a specific category from the main page.

Read More

Now I want to create a separate page which displays only this category, but I can’t work out how to add a new template to the theme through the online editor, in order to show these posts. I’m using the Clean Home theme.

Can someone help me work out how to do this? do I need to ssh in to the server to create a file, or is there some way of doing this through the admin console?

Related posts

Leave a Reply

2 comments

  1. WordPress does not allow adding files though the admin side of things, therefore you will need FTP or SSH access to the server to add a file to your theme directory at least to initially add the template then you can edit it though your hearts content in the admin. (there may be a plugin that allows the admin to add theme files but I’ve never looked)

    Nevertheless, here’s how to add a new template…

    1. Create a new php file and include the following to create a custom template and upload it to wp-content/themes/clean-home

      <?php
       /*
      Template Name: My Template
      */
      ?>
      
    2. Then just add Your Loop

    3. Set a page to use your new custom template.

    Protip: You may also be able to copy another template and change the name which will save you time of adding the header, footer, sidebar, and other styles with still allowing you to create a custom template.

  2. No, as far as I can tell, you can’t create a new template file through the admin interface (there might well be a plugin that enables this, but not in the stock wordpress install). You’ll need to create it on your desktop and FTP it up.

    And I assume you’ve read this page for creating single-category templates.