Support » Installation » [Resolved] Parent/Child Category Problem

[Resolved] Parent/Child Category Problem

  • Hi,
    I’ve got 2 categories in my Blog and as the number of posts grow, I want to categorize it in a better way.
    The 2 categories: Travel & Projects
    and sub categories for Travel: Uk, China, USA
    and sub categories for Projects: Music, Architecture

    and when I make it, it displays as follows like a mess:
    >> Music

    how can I make it like
    and so on? Thnaks

Viewing 15 replies - 1 through 15 (of 34 total)
  • I don’t see any difference in the two lists you’ve posted…

    Try using the hierarchical=1 option to wp_list_cats().

    Let us know if that doesn’t work, or if you need more help.

    thanks both of you,
    skippy, actually i’m right now reading the page you gave me…been searching for a while on this topic these days.

    as for my last post….well, don’t know what happen and makes no difference, maybe i’ll show it clearer.

    the sub category of music and architecture tends to go RIGHT HAND SIDE a little bit.

    I am using just the default
    <?php wp_list_cats(); ?>

    and everything is “styled” from the style.css
    See it here.

    moshu, i don know why i can’t get it work like yours

    everything no matter parent or child just display like what i showed above. 🙁

    i’m still trying hard to read the page at http://codex.wordpress.org/Template_Tags/wp_list_cats

    As I said above: take a look at the style.css file I am using. For the lists in the nav div I have:
    #nav ul {
    color: #ffedd6;
    font-weight: bold;
    list-style-type: none;
    margin: 0;
    padding-left: 3px; <=== THIS...

    and for the subcats (which are embedded lists!)
    #nav ul ul li {
    border: 0;
    font: normal normal 70%/115% Georgia, 'Times New Roman', Times, serif;
    letter-spacing: 0;
    margin-top: 0;
    padding: 0;
    padding-left: 12px; <== ...and THIS

    i think it’s impossible to look at the style.css? right? it’s in the forbidden place.

    i use the kubrick theme, and by defualt, the category coding in my sidebar is:

    <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>

    well then, the subcategory is just in the same place as the categories itself.

    Good day, everyone,
    I’m a newbie and having the same problem as chatterbox
    I just got WP installed an hour ago and the PHP was the same like his. Any solutions to it? to the child/parent categorizing?
    Thanks in advance,

    Take a look at moshu’s response above. The arrows mark the spots.

    Minna, thanks, hehe I’m just a little newbie, and can’t see this CSS code anywhere under the Kubrick theme.
    Moreover, Moshu is not using a Kubrick theme. 🙂
    I’m sorry and know I should have use the WIKI or search and Google/Yahoo!, but I just do not know a word from it.
    Please accept my apology for being knowing nothing…..

    @kyd: No worries, I’ll take a look at the Kubrick code and tell where to look 🙂 Unless someone beats me to it.

    Code looked at
    1. Well, first of all, as a default Kubrick doesn’t show categories in a hierarchical list (see wp_list_cats in the sidebar and check that hierarchical=1 not 0). If that doesn’t change indenting, go to step 2.
    2. Kubrick theme assigns a class “children” to the child categories/lists so you could add in your style.css (if it isn’t there already)
    ul.children {
    margin-left: 5px; /* adjust to your liking */

    i’ve added the code you said to my style.css, and tried to add it in various places, one try after the other. but just it didn’t work. thanks for your help………

    stchatterbox and kyd,

    FYI, if you have FireFox installed (which you should if you’re customizing WP themes and need to test them!) and add the webdeveloper extension, you can see the css styles for any page simply by using tools/webdeveloper/css/view css

    Saves SO much time, rather than trying to find the css file!

    kyd, can you let us see your site?

    i discovered: the answer is just in WIKI. hidden somewhere.,

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘[Resolved] Parent/Child Category Problem’ is closed to new replies.