• Resolved Niclas

    (@najclas)


    Hi!

    Before I do my thing, I just have to say that I’ve googled this problem and searched the forums for two days now. And while there are some topics that may be of help – I have yet to found one that solved my problem.

    So on to the problem:

    I’m doing a website that should display different categories on different pages of the site. The posts will be layouted differently depending on which page they are on. I figured I could use page templates for this and have a custom “loop” on every template.

    However, when I create a new template they won’t show up in the page-template dropdown when creating a new page.

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

    to define the custom page name.

    Sometimes, I get “about */ ?>” to show up in the page-template dropdown but it won’t select and if I refresh, I can’t even get the dropdown to drop down.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I figured I could use page templates for this

    That’s where you went wrong. Pages are not for displaying posts. Period.

    Use Category_Templates for what you want – that’s why they were introduced: to display category listings.
    Leave the Pages alone…

    Thread Starter Niclas

    (@najclas)

    Oh, that looks interesting. Do I just create a file named news.php and create the looop within? How do i link to those files though?

    Don’t ask back before you read the whole article…

    Thread Starter Niclas

    (@najclas)

    oh, ok I get it now. So my next question is how to mix both links to “archives” and pages in the same menu?

    My little blog post getting popular… ??
    Just posted it 2 minutes ago:
    Pages and Categories in menu

    Thread Starter Niclas

    (@najclas)

    Thank you so much moshu! This thread is resolved!

    Thread Starter Niclas

    (@najclas)

    ok, now I have a new problem. I just reinstalled my system and backed up my whole web-folder. And when I reinstalled wordpress, it stopped recognizing my category-x.php files.

    I’ve tried both php4 and php5 but it’s not working with either one.

    edit: found what was causing it. back to resolved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘page templates won’t show’ is closed to new replies.