Forums

display Category lists (8 posts)

  1. lhoylhoy
    Member
    Posted 4 months ago #

    hi guys! hope someone could help me out here,

    I created child categories that belong to a single parent category.
    for example:

    parent-category - free wordpress themes
    child-categories - black, white, author1, author2

    what i want to appear in my archive page:

    Archives by color
    black
    white

    Archives by Author
    author1
    author2

    how can i achieve this? thanks

  2. esmi
    Member
    Posted 4 months ago #

    Wouldn't tags work better here?

  3. lhoylhoy
    Member
    Posted 4 months ago #

    hi esmi, i already made it in category, if not, how would using tags solve this problem? what i want to do is display those lists in my archive page, thanks

  4. kichu
    Member
    Posted 4 months ago #

    Why not make use of WP 2.8's custom taxonomies. There are couple of good tutorials on this subject:

    http://justintadlock.com/archives/2009/05/06/custom-taxonomies-in-wordpress-28

    http://yoast.com/wordpress-custom-taxonomies/

    Cheers!

    S.K

  5. esmi
    Member
    Posted 4 months ago #

    how would using tags solve this problem

    Just thinking that you could have a tag page for "white", one for "black" etc.

  6. jadedstudio
    Member
    Posted 4 months ago #

    Can you not go a level deeper like this

    -parent-category
    --colour
    ---black
    ---white
    --author
    ---author1
    ---author2

    etc...

    Never tried this before, but this is how I would approach it to begin with

  7. lhoylhoy
    Member
    Posted 4 months ago #

    @kichu thanks for that solution but id rather use a much simpler code rather that more tasks. thanks.

    @jadedstudio, @esmi,

    based on kubrick's archives.php, i'm using

    <h2>Archives by Subject:</h2>
    <ul>
        <?php wp_list_categories('title_li'); ?>
    </ul>

    using <?php wp_list_categories('title_li'); ?> will display all list of categories right?

    i wanted to split it so i could display:

    <h2>Archives by designer</h2>
    <ul>
        designer1, designer2, ...
    </ul>
    <h2>Archives by design</h2>
    <ul>
        design1, design2, ...
    </ul>

    designers and design are defined as child categories of free wordpress themes

    how would i do this?

  8. esmi
    Member
    Posted 4 months ago #

    The only thing I can think of is to use the child_of parameter with wp_list_categories.

    http://codex.wordpress.org/Template_Tags/wp_list_categories#Only_Show_Children_of_a_Category

Reply

You must log in to post.

About this Topic

Tags

No tags yet.