Support » Fixing WordPress » Problem with multiple templates

  • I am having trouble with adding an additional template for my sub pages. I copy the template that I want to use as a start and add the following to the top of it:

    Template Name: SubAds

    Now after I go to Admin>Manage>Pages>Edit> in the Page template dropdown it shows its name as:

    SubAds */ ?> then the actual code from the template is showing up!

    What am I doing wrong?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Nobody has any clue to what is going on with this?

    Are you editing your template on Mac?

    Ya.. using dreamweaver

    That’s a deadly combination 🙂
    1. I hope you use the code mod… otherwise you’ll always be screwed up.
    2. make sure you save the file after editing with the correct line breaks/ending – UNIX and not something else.

    so what should I do then? Not sure I follow you

    Try to save the edited template file in a plain text editor and re-upload.

    In intelligent editors (maybe even in DW) you can define the line breaks as DOS or UNIX or MAC. You need Unix for the template files.


    I have another problem with multiple templates.

    The steps the startposter took to make a subpage with another template works fine for me, but the loop sums up the pages and not the posts.

    So I made a file called journal.php and added the template name code in the top of that file.

    Then, I added a new page in the wordpress back-end and activated the template setting.

    What is the right workround to create a landingpage(home.php, don’t have a problem here), with sub-blogs(cant figure out how to create this).

    To clear things out, here’s my idea:

    – Homepage

    • – Journal
    • – Music
    • – Photo

    – About
    – Contact

    My idea was to create a different template for each sub-blog: journal, music and photo

    Create posts and separate them by adding catagories for each item responding to their subblog name.

    (I hope i my point clear because english is not my native language)

    There are no “sub-blogs” in WP. Just one single blog, that’s for starters…

    Yes, journal, music, photo should be CATEGORIES , not Pages. Pages are not meant to display posts. Period.
    Category_Templates work just fine. Why do you need Pages?

    (your English is OK; your thinking of Pages is not OK 🙂


    I was thinking way to difficult.

    In the codex, under Template Hierarchy In Detail, Page is the first linked item you run into. I think that confused me.

    Thanks for the fast feedback!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Problem with multiple templates’ is closed to new replies.