Problem with multiple templates (10 posts)

  1. fluentdesigns
    Posted 8 years ago #

    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?

  2. fluentdesigns
    Posted 8 years ago #

    Nobody has any clue to what is going on with this?

  3. moshu
    Posted 8 years ago #

    Are you editing your template on Mac?

  4. fluentdesigns
    Posted 8 years ago #

    Ya.. using dreamweaver

  5. moshu
    Posted 8 years ago #

    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.

  6. fluentdesigns
    Posted 8 years ago #

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

  7. moshu
    Posted 8 years ago #

    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.

  8. nikozz
    Posted 8 years ago #


    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)

  9. moshu
    Posted 8 years ago #

    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 :)

  10. nikozz
    Posted 8 years ago #


    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!

Topic Closed

This topic has been closed to new replies.

About this Topic