WordPress.org

Ready to get started?Download WordPress

Forums

Missing ul, li for subcats? (25 posts)

  1. moshu
    Member
    Posted 9 years ago #

    WP 1.5 "latest" (downloaded March 5).
    When I create sub-Pages the Pages list in the sidebar will generate around the subpage link an additional <ul><li> tag so I can style them differently (indent etc. in the css file using ul li ul li ul li) but for the children categories (a.k.a subcategories) there is no such additional <ul><li> tag generated.
    I have tried both the list_cats and wp_list_cats with all the possible parameter variations described in the Codex, but no success.
    I have seen a "bug report" filed here, though it complains about the lack of indent.

    Is there a solution and I am missing something or we have to wait until it will be fixed?
    Thanks.

  2. Root
    Member
    Posted 9 years ago #

    I am thinking about this moshu.........

  3. Root
    Member
    Posted 9 years ago #

    Try #pagenav ul ul li a

  4. moshu
    Member
    Posted 9 years ago #

    Are you suggesting to create a new div called "pagenav" ? Maybe I am slow, but I don't get it. The page links work correctly (e.g. on my testblog), but the category links don't. On the same page "wordprss" should be a subcat (=indent) in "blog stuff".

  5. Root
    Member
    Posted 9 years ago #

    Well I have #pagenav in mine which I did not put in myself so heck knows where it came from. As I understand it the pages list are in their own div with that ul ul li structure for descendants. Whats your url for this ?

  6. moshu
    Member
    Posted 9 years ago #

  7. Root
    Member
    Posted 9 years ago #

    Found yr testblog. #pagenav is the li id not a div. You have it already. Go with my selector and keep your fingers crossed.

  8. Root
    Member
    Posted 9 years ago #

    # is an id not necessarily a div. Its very handy. It can now be applied to virtually anything in WP.

  9. Root
    Member
    Posted 9 years ago #

    I have mine running my *test* sub page is temporarily in green :)

  10. Root
    Member
    Posted 9 years ago #

    Funny stuff this CSS :)

  11. moshu
    Member
    Posted 9 years ago #

    OK, 2 things.
    Yes, I see now the #pagenav li id for the Pages. That's fine.

    However, the Categories have the #categories li id AND in the list it does NOT insert an additional ul for subcats whereas under Pages there is an additional ul for subpages - as stated in my original post. Anyway, I'll give it a try.

  12. Root
    Member
    Posted 9 years ago #

    That is for pages. For categories just use children. (Its in the old css)

  13. Root
    Member
    Posted 9 years ago #

    Like this #nav ul ul ul.children

  14. moshu
    Member
    Posted 9 years ago #

    LOL, ok we are back to the startpoint... For some odd reason my WP does not generate class="children" for the subcats. It's driving me nuts, I've tried all the possible parameters for the tag, but nothing.
    What would be the correct tag to get the children class for the subcats???
    Thank you for your patience!

  15. Root
    Member
    Posted 9 years ago #

    .children will not be visible in the mark up. Its css only. Try it :)

  16. Root
    Member
    Posted 9 years ago #

    I have now finally identified the proper CSS selector for the sub cats. It is #pagenav ul li ul li a .

    Which is my blog currently displays a sub cat with a green bg :). HTH.

  17. Root
    Member
    Posted 9 years ago #

    No I am sorry. That is not it. GGrrrrhhhh.

  18. moshu
    Member
    Posted 9 years ago #

    If anybody's wondering what the solution is for indenting subcats see this http://trac.wordpress.org/changeset/2396

  19. tjinh200
    Member
    Posted 9 years ago #

    i uploaded their revisions, but i don't see any difference? my subcategories are still not indented ...

  20. TechGnome
    Moderator
    Posted 9 years ago #

    tjinh200 -- PSSST! Let me you in on a little secret. wp_list_cats doesn't work as advertised. I spent 4 friggin hours last night (time I might add that I will NEVER get back) battling the near opposite. I DIDN'T want the sub cats listed..... and they kept showing back up... I finaly found the "magic incantation" to make them do away.

    That said.... I think what you want is this spell:
    children=1
    heirarchical=1
    hide_empty=0

    I think that will do it for you.

    Tg

  21. tjinh200
    Member
    Posted 9 years ago #

    actually, what i'm looking for, you seem to have working on your site, i want my subcategories to indent ... how did you make that work on your site?

  22. TechGnome
    Moderator
    Posted 9 years ago #

    hehe.... I'm still using WP1.2 ..... the function still worked back then.

    Tg

  23. moshu
    Member
    Posted 9 years ago #

    tjinh,
    after uploading the revised files did you check what the output is and modified the css accordingly?
    I worked for me.

  24. counsel
    Member
    Posted 8 years ago #

    Curious..

    I have the same post at http://www.pocosin.com and wordpress.pocosin.com. At http://www.pocosin.com, the ul and subsequent uls nested therein show up as they should. However, in WP 1.5, I saw no tabbed indention with the subsequent li or nested uls. I will follow the links and hope that solves the problem...

  25. counsel
    Member
    Posted 8 years ago #

    I am assuming that the following, from my style.css, is what makes the ul and li display.

    .meta ul {
    display: inline;
    }

    .meta li {
    display: inline;
    list-style-type: none;
    }

    .centreblock ul, .leftsideSection ul, .rightsideSection ul {
    list-style-type: none;
    margin: 0;
    padding-left: 3px;
    }

    .centreblock ul li {
    }

    /* this fixes an IE bug with aligned or floated images */
    .storyContent img {
    position:relative;
    }

    .storyContent ul li {
    list-style-type: disc;
    margin-left: 10px;
    padding-left: 5px;
    }

    Might someone advise me on how to make the subnested ul and li indent?

    Thanks...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.