• I’m trying to get my category list to behave, but having a bit of trouble doing so.
    What I’m aiming for is @: https://tekmonki.com (that’s textpattern).
    What I have now is @: https://tekmonki.com/fix-index.php
    The problems I’m having are:
    1. When I do ‘wp_list_cats(‘exclude=”22,16″‘)’, it’s only excluding whatever the first ID is. It seems to ignore the subsequent one. Also, is there a way to sort by . . I don’t know, importance? For example, I’d prefer “Home, Musik, Fotos, Kontakt, Word”. The only options I see are by asc/dsc.
    2. I want the top category with a bottom-border, and then the sub-categories with no bottom-border. So far I can only get either each cat/subcat combo to have a bottom border or the subcats will have a bottom border.
    I suppose I could make a custom menu, but I’d like to avoid this if possible so I can keep the flexibility of using wp_list_cats.

Viewing 15 replies - 1 through 15 (of 29 total)
  • You sort by adding spaces to the cat names.
    They won’t show up when on the page.
    As for styling, you can style each cat by using css.

    Thread Starter TMo

    (@tmo)

    Thanks podz.
    I’ll try the spaces thing.
    And yeah, I figured it was CSS, but I’m not sure what’s “ul” and what’s “li” and what’s “ul li” . . I checked wp_list_cats code and it doesn’t really specify.

    https://www.w3schools.com/css/css_list.asp
    this is always a good start to learn ??

    Have a look here:
    https://www.tamba2.org.uk/wordpress/1css/
    and the css:
    https://www.tamba2.org.uk/wordpress/1css/wp-layout.css
    This is the type of thing you need:
    #menu ul li#blogs {
    border:2px solid #ff0000;
    }
    #menu ul li#blogs ul li a:hover {
    color: #090;
    }
    That assumes you have a category called ‘blogs’

    Thread Starter TMo

    (@tmo)

    Thanks guys. . .
    I checked that w3c thing out a bit ago. I don’t see where it says what “li” and “ul” are though. I freely admit that I’m a CSS noob. Most of the stuff I can hack about and figure out, but I consistently get stuck on this “list” thing. I’ve tried every combo of “ul li ul li” that I know about, and it comes close, but still doesn’t quite do what I want.
    Maybe it’s “tmi”, but I started using WordPress as a means to easily update my then table-laden site. It seemed to do what I want for the most part, but I was curious about what else was out there so I found a TextPattern import script, ran it, and inadvertently hosed my WP install.
    So I played with TXP for a bit since I was kinda “forced” to use it to have a site, but I’m finding that all the proprietary code is way over my head and not so intuitive.
    I managed to get most everything back into a fresh WP install, but this little project that I figured would take a couple weeks at most is coming up on two months now. I spend every non-working-waking minute on it much to the chagrin of everyone around me (“shutup about the damn website already!!!”). It’s become a bit of an obsession I think. = ]
    Learning all this new stuff has been great and I appreciate all the help on offer here, but I just want something that works in a format I’m happy with so I can get back to what I love and do best . . . making music.
    /me ends moaning. = ]

    If you get stuck, just post something like:
    “On my site, where the ‘blogs’ category is, how can I get a green border with yellow dots on the backgound and the links go purple when you hover them ?”
    and you’ll get the help you need.
    If you can be specific as to the ‘where’ and the ‘what’, you’ll get the ‘how’ ??

    I don’t see where it says what “li” and “ul” are though

    well, then let’s go back to the basics ?? html school, lists:
    https://www.w3schools.com/html/html_lists.asp

    Thread Starter TMo

    (@tmo)

    Ok. So using wp_list_cats . . .
    Since there’s no list specified in the php that I can see . . .I’m assuming that main categories are considered “ul li” and then subcats are considered “ul li ul li” ? Right?

    Thread Starter TMo

    (@tmo)

    Oh, and just for reference . . this is how the menu is coded.
    ‘<div id=”menu”>
    <div id=”masterdiv”>
    <?php wp_list_cats(‘exclude=”22,16″‘,’sort_order=”asc”‘); ?></div>

    Thread Starter TMo

    (@tmo)

    So it seems like what I want to do, which is put a ‘border-bottom: 1px solid;’ under each category, but not subcat can’t be done with wp_list_cats as it doesn’t break them out. If I try putting it in “ul ul” it puts it under the whole thing cat/subcat.

    Thread Starter TMo

    (@tmo)

    Or you could give me just enough info to drive myself insane.
    Shall I beg or start a new thread?

    Hang on ??
    Let me look a sec ……

    Thread Starter TMo

    (@tmo)

    Would this be a job for the “links” section in the Admin panel maybe?

    Okay – where do you want these lines to appear ? Under which words ?

    Press ctrl-f5 on your machine ?
    I see those underlined already.

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘Styling wp_list_cats?’ is closed to new replies.