WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Category of a page: problem with Classic 1.5 Theme (5 posts)

  1. ed800uk
    Member
    Posted 7 years ago #

    The Classic 1.5 (as installed from wordpress-2.0.4.zip) displays a "Category" for Pages. When I create or edit a Page I can't see any way to change the Category (which is always the default). There is no point having a Category if it's always the same.

    I'm sure I read somewhere that Pages do not have Categories. (I wish they did!) I think this a bug in the Theme?

  2. moshu
    Member
    Posted 7 years ago #

    To start with the last question: NOT a bug, just a shortcoming.
    The Classic is one of the simplest themes ever: very few template files. Which results in everything being displayed using the index.php template file.
    Reading: http://codex.wordpress.org/Template_Hierarchy

    Fix. Use either conditional tags or create the necessary template files, like page.php, single.php, archive.php etc...
    http://codex.wordpress.org/Theme_Development

  3. ed800uk
    Member
    Posted 7 years ago #

    Thanks for reply, most of which I do not understand, sorry.

    If you were explaining how I can get rid of the misleading "Filed under: Uncategorized" that occurs under each Title when you display a Page in Classic 1.5, I think it will be a while before I work out what I have to do ;-)

    I found the reference to the lack of Categories in Pages:

    http://codex.wordpress.org/Pages#Pages_can_use_Different_Templates
    "Pages are not Posts ... ... nor can they be associated with Categories."

  4. moshu
    Member
    Posted 7 years ago #

    All the quotes at the end of your post above are true. However, for internal technical reasons Pages are always "associated" with the default category.

    As I said above, the fix is easy:
    1. Save your index.php (from the theme!) as page.php
    2. Edit the file in a plain text editor > remove the_category tag and the surrounding text. Additionally, you can remove the call for the comments template.
    If you've read the Template Hierarchy article before replying - you should have understood it.

  5. ed800uk
    Member
    Posted 7 years ago #

    moshu, thanks again, sorted. I'll learn how to use this excellent tool properly, I promise. Ed.

Topic Closed

This topic has been closed to new replies.

About this Topic