• I’ve made a custom template so that I could have different page-structures on my website. For example: if I don’t want the sidebar on a custom page, I make a custom template: a copy of index.php and edit it + name it.

    But it seems that if I’m using that particular template, it ignores other files, like page.php, single.php, comments.php, functions.php etc.

    How can I make these pages also for that one different template?

Viewing 13 replies - 1 through 13 (of 13 total)
  • You need to edit them or better yet create your own copies of all of them..

    Thread Starter DawnAllure

    (@dawnallure)

    If I’d make a copy of them, which name should I give them?
    And do I need to add the same thing I added in the index.php:

    <?php
    /*
    Template Name: Custom1
    */
    ?>

    Make a new theme… In a new folder.

    Thread Starter DawnAllure

    (@dawnallure)

    But it’s the same theme, yet an other structure (with almost the same design). You can chose those templates when you’re editing a page at the “Page Attributes” panel: There is a drop down for “Template”

    Thats different, thats a “page template”. So call it what every you want..

    The admin panel will find them..

    Thread Starter DawnAllure

    (@dawnallure)

    Oh, thank you for that name, but it seems like that page template ignores the other files (like functions.php), how should I solve this?

    They are just template pages, make sure it is similar to the default one.

    You have probably removed the get_header(); at the top line of something..

    <?php
    /*
    Template Name: Custom1
    */
    get_header(); ?>
    Thread Starter DawnAllure

    (@dawnallure)

    Unfortunately not… But the problem is, when I’ve made a page, and I choose the Custom1-page template, the page looks like it is a “post” (while it’s not, and if I use the default template it just like a normal page)…

    Then you made a mistake in your new template. What file did you start with?

    You said it was ignoring the functions, not looking like a post. Please provide some links.

    Thread Starter DawnAllure

    (@dawnallure)

    I made a copy of index.php and changed it. What I actually meant is that it seems like the page template is ignoring the page.php file (and there was a chance that it also ignored the other files), and therefore it looks like a post.

    The site is not yet online, I am on localhost now, so I’m not able to provide a link.

    If you want your template to look like page.php, make a copy of that one and modify it.

    Thread Starter DawnAllure

    (@dawnallure)

    Thanks for your help!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Template other than default’ is closed to new replies.