WordPress.org

Ready to get started?Download WordPress

Forums

Parent Categories Gone After 1.5 Upgrade (8 posts)

  1. stupidpoeticjustice
    Member
    Posted 9 years ago #

    Hello:

    I recently upgraded from 1.2 to 1.5. I followed the upgrade instruction carefully and appeared to not encounter any problems. However, I quickly noticed that the parent categories no longer appears. In other words, the categories are now in one list---the sub category are no longer indented. However, in the categories management interface (categories.php), they appear to still be organized into parent categories and sub categories.

    In the sidebar.php file the code:

  2. <h2><?php _e('Categories'); ?></h2>
      <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
  3. Any suggestions would be greatly appreciated!

  • Lorelle
    Member
    Posted 9 years ago #

    You might want to try again with wp_list_cats since it follows a more "verbal" approach than list_cats does.

    For what you are using, if I read this right, you have 0 set where it should be TRUE or FALSE not 0. I don't know if it will respond to 0 or 1 as a TRUE or FALSE replacement. Might change it and see if that makes a difference. Under FILE you have 1 and that should be a string like index.php or another filename. Under LIST, you have 0 which isn't a TRUE or FALSE...these are brutal. Here:

    <?php list_cats(optionall, 'all', 'sort_column',
    'sort_order', 'file', list, optiondates,
    optioncount, hide_empty, use_desc_for_title,
    children, child_of, 'categories', recurse,
    'feed', 'feed_img', 'exclude',
    hierarchical); ?>

    What I do with these is to write all the arguments down with the apostrophe quotes and all, with the default answers, and then go through and change each one to what I want, just to make sure.

    All these 1,0101,201,34oi2u34098 makes me cross-eyed.

  • moshu
    Member
    Posted 9 years ago #

    SPJ, There are 18 arguments, but you have only 17. Add one more!

  • Lorelle
    Member
    Posted 9 years ago #

    OH, and I forgot, indents are handled by the style.css file in the Theme you are using. Change the padding or margins there to indent them more or less than you want.

    http://codex.wordpress.org/Styling_lists_with_CSS

  • stupidpoeticjustice
    Member
    Posted 9 years ago #

    Thanks for all the replies. I'll give it a try this evening.

  • stupidpoeticjustice
    Member
    Posted 9 years ago #

    Still having problems. I played with the arguments in list_cats, but still have the same problem. My goal is to format the categories to have them organized by parent category:

    parent
    - sub
    - sub
    - sub
    parent
    - sub
    - sub
    - sub
    etc...

    currently, all categories are displays, but they are not organized by parent category. does that organization need to occur in css? if so, what do i need to add/modify? any help would be greatly appreciated!

    from sidebar.php:

  • <h2><?php _e('Categories'); ?></h2>
  • lquilter
    Member
    Posted 8 years ago #

    The solution posted here

    http://www.kahsoon.com/2005/05/10/wordpress-hierarchical-category-indent/

    worked for me.

  • moshu
    Member
    Posted 8 years ago #

    Upgrade to 1.5.1 and you'll be fine, no need for additional solutions.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.