• I have spent hours trying to figure this out and can not get what should work to work.

    I have created a Word Press theme and I want to now create an additional template that I can use for different pages across my WordPress site.

    Here is what I have done:
    – I create a copy of my page.php and renamed it
    – I placed this code at the very top of the page:
    <?php
    /*
    Template Name: new template
    */
    ?>
    – I uploaded this file into my theme folder

    1. The new template is not available to me to choose from in the drop down list when you add a new page or edit existing pages.

    2. As a matter of fact, I only see the drop-down to change the template for a page when I use Quick Edit for a page. I do not see this drop-down on the create a new page or edit a page.
    Under the “attributes” section in Quick Edit, there is an area for Parent and Order. The drop down directly below Parent includes a listing of my existing pages, not templates.

    Am I Doing something wrong?

    Thanks for any help!!!!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Switch to the default theme for a second and switch back to the theme with the custom template and see if a template dropdpown now appears in Attributes.

    Thread Starter stanwelks

    (@stanwelks)

    Do you mean to go to Appearance > Themes and select the first theme that appears? I am not sure which is the default theme. I have never switched themes before. Will it easily go back to the way it was when I re-select my theme after selecting the default one?

    Thanks!!!!

    Yes and yes. It only takes two seconds to switch themes.

    Thread Starter stanwelks

    (@stanwelks)

    That took care of it!!!! Thank you so MUCH. I have spent hours trying to get this to work.

    1.) Is this a bug with my install or why did this happen? Is it anything I need to be concerned with, with regards to my install?

    2.) How do I now remove the widgets that display on all of my other pages from this new template page?

    Thank you!!!!1

    Not a bug; just sh*t happens. When you Edit the Widget, there’s a Remove button.

    Thread Starter stanwelks

    (@stanwelks)

    I do not want to remove the widgets from the pages they are already on. I just want to remove them from the new pages I just applied this new template to.

    Thanks!

    I think you have to make a new sidebar, like sidebar2.php and call to that sidebar instead of your normal in that page template then

    Thread Starter stanwelks

    (@stanwelks)

    Would simply removing this:

    </div>
    <?php include (TEMPLATEPATH . ‘/sidebar1.php’); ?>
    </div>

    remove the widgets from this template page?

    Thanks!

    if that is how your sidebar is called in, then yeah that’ll do it!
    On mine it would be <?php get_sidebar(); ?>

    watch out for those </div> closing tags tho…..Don’t delete any closing tags unless you are also deleting the openings

    You might have to make a new sidebar, as Rvoodoo says. But then test your site in different browsers and use the The W3C Markup Validation Service to be sure your code is accurate and the site displays correctly.

    Thread Starter stanwelks

    (@stanwelks)

    Thanks guys for all your help!!!!

    I will try the different ways out and post back here. 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Is this a bug? Can someone please help me get additional templates wiorking?’ is closed to new replies.