WordPress.org

Ready to get started?Download WordPress

Forums

WP 1.5 sub-categories displaying under categories ? (17 posts)

  1. chuckblue
    Member
    Posted 9 years ago #

    I'm not sure how to fix this, but I have 2 sub-categories under one category.

    They don't display as sub-categories, but as categories.

    When I created them, I added them as child categories to the parent category 'poems'.

    Instead of science ficiton and fun being under poems, they are listed alphabetically as categories, not sub-categories.

    site:
    http://poetry.drivein-jim.net/

    Thanks.

  2. nearlythere
    Member
    Posted 9 years ago #

    Hm... it looks to me as if they are actually appearing as 'sub categories'. You'll notice that in Science fiction, you only have 'ocean of stars' and in poetry you have two poems, one from 'fun', and including 'ocean of stars'.

    But, on the menu on the left, there's no hierarchy. You could 'exclude' showing certain categories in your menu (so only the top level 'poems' shows.)

    And maybe on your poetry page, you'd rather see a listing of each category, instead of the whole poem?

  3. chuckblue
    Member
    Posted 9 years ago #

    when using 1.2.2 and I create a number of sub-categories under each category, they display as sub-categories under the parent category.

    I didn't do anything different for 1.5 when I added the sub- and categories, but the subs don't appear under the parent category on the list on the main page..

    and example of how I thought it was going to look, and the way it does look under 1.2.2, can be seen on a 1.2.2 site of mine:

    http://www.drivein-jim.net/blog/

    chuckblue

  4. chuckblue
    Member
    Posted 9 years ago #

    weird... pagination isn't working on the main site. I'll have to take it out so you can see what I mean.

  5. chuckblue
    Member
    Posted 9 years ago #

    on the admin categories page, the subs do show as being under the main categories.

  6. chuckblue
    Member
    Posted 9 years ago #

    any suggestions on how to fix this ?

    Or do I have to drop back to 1.2.2 ?

    Thanks

  7. toddmain
    Member
    Posted 9 years ago #

    i'm with you, this seems like a bug in 1.5 (or maybe it's Kubrik). nobody seems to know the answer or want to answer. i posted the same question before seeing your post in http://wordpress.org/support/topic.php?id=26422

    the code for 1.5 and 1.2 is exactly the same as:
    <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>

    but 1.5 doesn't display properly.

    is anybody out there?

  8. kingcosmonaut
    Member
    Posted 9 years ago #

    Bumper... ;-)

    Same problem too.

  9. TechGnome
    Moderator
    Posted 9 years ago #

    According to the entry in the Codex: http://codex.wordpress.org/Template_Tags/list_cats

    There's a new parameter "hierarchical" that can be set. Don't know if it will help or not though.

    Tg

  10. kingcosmonaut
    Member
    Posted 9 years ago #

    Yes, that's true, but with the WP built I downloaded yesterday this just didn't work anymore...

  11. nearlythere
    Member
    Posted 9 years ago #

    it looks like chuckblue fixed the problem... i see the use of "<ul class='children'>" in his website...

    how'd you do it?

    if you really did discover a bug... did anyone submit this to mosquito, the bug tracker for wordpress...

    http://mosquito.wordpress.org/view_all_bug_page.php

  12. moshu
    Member
    Posted 9 years ago #

    It was corrected in this revised file:
    http://trac.wordpress.org/changeset/2396
    replace your template-functions-category.php file with the new one and it will fix it.

  13. ColourDreamer
    Member
    Posted 9 years ago #

    This works, but now when I set it to hide empty (only showing empty worked before) it hides the empty categories even with sub-categories in them. Any fix?

  14. Zapa
    Member
    Posted 9 years ago #

    Hi all!

    I had the same original problem and it had been mid-fixed with the file provided by moshu (thank you!) :P . Now the categories are nested but the way they had been nested is a little disordered. The bullet of the parent category appears at medium level of the sub-categories and the interline space between the parent and the sub is too high.

    I don't know if this is a local problem of mine or a general problem. I'm using WordPress 1.5 and my blog's URL is http://enezeta.com/zapateces

    And... euh... I'm sorry but I have no idea of php and very little of html so don't be cruel with me. Hehehe...

    Thank you for your incredible job here!

  15. lquilter
    Member
    Posted 9 years ago #

    Hmm. I'm having the same problem in spades [lquilter.net/blog]. My config file wouldn't recognize the hierarchical setting, or the exclude setting, or the sort_column setting.

    The upgrade template-functions-category.php file that moshu linked fixed the sort_column setting, but not the exclude or hierarchical setting problems.

    Here's my code and if anyone can see what's wrong I'd really appreciate commentary. I've tried list_cats and wp_list_cats; single quotes & double quotes; TRUE/FALSE and 1/0 (my understanding is that those two binary sets are equivalent, btw).

    list_cats version: list_cats(TRUE, '', "name", '', '', 1, 0,
    1, 1, 0, 1, '', '', '', '', '', "57", TRUE);

    wp_list_cats version: wp_list_cats('optionall=1&sort_column="name"&list=1&optioncount=1
    &hide_empty=1&children=1&exclude="57"&hierarchical=1');

    It looks like bloggedy who had posted in the http://wordpress.org/support/topic.php?id=26422 thread got it to work. Any idea how?

    BTW -- there are a few other similar threads:
    - http://wordpress.org/support/topic/26834
    - http://wordpress.org/support/topic.php?id=26422 as previously mentioned
    - http://wordpress.org/support/topic.php?id=7552 starts out somewhere else but ends w/ the parent/child category problem
    - http://wordpress.org/support/topic.php?id=23891 says they have a solution, and i'll be testing it soon.
    - http://wordpress.org/support/topic.php?id=11766 seems to have some possibly related problems

  16. lquilter
    Member
    Posted 9 years ago #

  17. Zapa
    Member
    Posted 9 years ago #

    Hi lquilter

    I've tried this solution but I don't know if i did it well. I seek for sidebar.php inside my greenmarine theme folder and change the value

    <?php wp_list_cats(); ?>

    for this one

    < ?php list_cats(FALSE, '', 'name',
    'asc', '', TRUE, FALSE,
    TRUE, FALSE, FALSE,
    TRUE, FALSE, '', FALSE,
    '', '', '',
    TRUE); ?>

    but the only thing it happened is to appear this php text instead of the original categories, so i had to change to the previous version to see them (again in a weird format)

    I guess there is more stuff to change. Any idea will be appreciated.

    My blog: http://enezeta.com/zapateces

    Using WP 1.5 with template-functions-category.php patched

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.