• I hope in new release of wordpress, it will allow me to choose template and set order for a Category, just like I did for a Page.
    I think it is more gentler than that now using <?php if ( in_category( _x(‘gallery’, ‘gallery category slug’, ‘twentyten’) ) ) : ?> to create a gallery Category.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I hope in new release of wordpress, it will allow me to choose template and set order for a Category, just like I did for a Page.

    You could just make a template page for that category. category-slug.php will automatically format the category page for that cat.

    http://codex.wordpress.org/Category_Templates

    Thread Starter huangjb

    (@huangjb)

    Ahh, That is great, thanks Ipstenu.

    But if I am a theme developper, I don’t know the category slug and id when I am developping a theme.
    For example, a site may needs 2 news category, talking about different topic, but they need the same layout. Then I must copy the same template to category-news0.php and category-news1.php.

    Really don’t understand why they make Page type different, and allow it choose template, why not category and post?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    But if I am a theme developper, I don’t know the category slug and id when I am developping a theme.

    Thats a different matter. I would say use a theme setting type tool to assign templates to categories, but that’s not my forte.

    WP 3.1 will introduce post_formats which might make this a little easier.

    Another option might be to build a them options page that allows users to assign category ids to specific pre-written category template files which can then be called via get_template_part.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Category attributes, just like Page attributes’ is closed to new replies.