• Resolved stchatterbox

    (@stchatterbox)


    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:
    >>Travel
    >>UK
    >>China
    >>USA
    >>Project
    >> Music
    >>Architecture

    how can I make it like
    >>Travel
    >>UK
    >>China
    >>USA
    and so on? Thnaks

Viewing 15 replies - 16 through 30 (of 34 total)
  • minna
    Thankies! I’m so sorry to be so long winded. Now I understand that Kubrick Theme, by default, sets nothing for the subcategories, ie, it just looks like other parent category.

    So in this case, I need to customize the CSS individually everytime I add a child category?

    @kyd: you don’t need to customize CSS individually for each category (well, I’m sure you could, depending on the approach you take… ?? )

    Did you check the wp_list_cats() thing I mentioned up there? If you have a parametre hierarchical=1 inside the function/tag, what are you getting out? What does the list look like now?

    @minna, actually before posting here, I searched all around in Wiki. and went to all those relevant pages telling all about the functions, php(); etc…..and then I tried the following in my sidebar.php:
    I use this kubrick default
    <?php wp_list_cats(FALSE, '', 'ID', 'asc', '', TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, FALSE, '', FALSE, '', '', '', TRUE); ?>
    Changes that I did: and experimented with:
    <?php wp_list_cats(hierarchical=1); ?>
    result: parar error nothing show out in sidebar

    <?php wp_list_cats('hierarchical=1'); ?>
    result: the number of post in the category disappeared, and no changes regarding the children categories

    <<?php wp_list_cats(hierarchical='1'); ?>
    result: parsar error

    Then I came here for help, and tried again, but nothing changes either, i’ve made a page and take a look, experi10.madpage.com

    That first bit of code works for me and it indents the subcategories and your stylesheet should be working correctly too. The bit that affects the subcategories is
    #sidebar ul ul ul, #sidebar ul ol {
    margin: 0 0 0 10px;
    }

    which is found after “/* Begin Lists” in style.css. Those numbers are in the order of top, right, bottom, left, so 10px is the margin for left hand side.

    So, currently the code you have on that page you mentioned (“wordblah”) doesn’t do hierarchical category lists. Try putting the first bit of code back (the Kubrick default). If even that doesn’t work, are you sure “interest” is a subcategory of Uncategorized? ?? The source code should look something like this:
    <ul>
    <li>Uncategorized
    <ul class='children'>
    <li>interest</li>
    </ul>
    </li>
    </ul>

    @ Minna, thanks for your patience…
    The hierarchical didn’t work at all, i did sidebar changes, nothing change. i Viewed my source code, and it does not look like what you said https://www.ads-software.com/support/topic/38864#post-219938

    I’m still wondering what happened, 14 hours already, but problem didn’t solve at all…..

    maybe I’ll quit now to set up a gallery first……look for a plugin first.

    I just noticed you use WP1.5. I wonder if there was a bug in 1.5 regarding hierarchical listing… that’s the last thing I can think of.

    Heh, actually, after searching for a bit, there is a bug in WP1.5. Would you consider upgrading? ??

    Note to self: always check the WP version first……

    Thread Starter stchatterbox

    (@stchatterbox)

    minna, didn’t wiki claimed that hierarchical listing is not working prior WP1.5? So I think WP1.5 is not a problem, although the list was not working on mine too.

    As it is said in somany places, everybody should start their post by stating the version used.
    In WP 1.5 it never worked (bug). It was corrected in WP 1.5.1 and later versions.

    i’ve upgraded already, but still no effects

    At least the site you provided (“wordblah”) is still 1.5…
    Did you remember to change the parametre in wp_list_cats?

    i did!…..or if you could show me the how to show the code of the result i want [in kubrick]?
    sorry for my bad english too

    the sidebar…well, i did all the codes, but still nochanges.

    Am I looking at the correct site? xD (https://experi10.madpage.com/blog/wordpress/)
    Could you copy-paste what you have for wp_list_cats? Did you check that there really is a parent/sub category relationship between the two categories you currently have?

    @minna:
    you’re viewing the correct page.

    Interest is a subcategory under Uncatogorize.

    my whole sidebar code: take a look:


    <div id="sidebar">hi, I'm Experi Mental, this is my blog and let me see if i can type anything to this part of the blog!

    • <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    • <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.

    • <h2><?php _e('Author'); ?></h2>
    • -->

    • <?php /* If this is a category archive */ if (is_category()) { ?>
      You are currently browsing the archives for the <?php single_cat_title(''); ?> category.

      <?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
      You are currently browsing the "><?php echo bloginfo('name'); ?> weblog archives
      for the day <?php the_time('l, F jS, Y'); ?>.

      <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
      You are currently browsing the "><?php echo bloginfo('name'); ?> weblog archives
      for <?php the_time('F, Y'); ?>.

      <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
      You are currently browsing the "><?php echo bloginfo('name'); ?> weblog archives
      for the year <?php the_time('Y'); ?>.

      <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
      You have searched the "><?php echo bloginfo('name'); ?> weblog archives
      for '<?php echo wp_specialchars($s); ?>'. If you are unable to find anything in these search results, you can try one of these links.

      <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
      You are currently browsing the "><?php echo bloginfo('name'); ?> weblog archives.

      <?php } ?>

    • <?php wp_list_pages('title_li=<h2>' . __('Pages') . '</h2>' ); ?>

    • <h2><?php _e('Archives'); ?></h2>
      <?php wp_get_archives('type=monthly'); ?>
    • <h2><?php _e('Categories'); ?></h2>
      <?php wp_list_cats(FALSE, '', 'ID', 'asc', '', TRUE, FALSE, FALSE, TRUE, TRUE, TRUE, '', '', FALSE, '', '', '', TRUE); ?>

    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    <?php get_links_list(); ?>

    • <h2><?php _e('Meta'); ?></h2>

    <?php } ?>

    </div>

    thanks again.

    On that site you have drop down lists for categories and months that I can’t see in that source code. Are you sure you are editing the correct file (hey, I’m just out of ideas ?? )?

    I’m just wondering the whole thing because your source code states pretty clearly: <meta name="generator" content="WordPress 1.5" /> <!-- leave this for stats -->
    That would suggest you haven’t upgraded, at least not successfully.

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