• I found some problem with categories when it ordered hierarchically.
    It my sample http://vinoosuae.com/ categories “Brackish Aquarium”, “Freshwater aquarium” and “Seawater Aquarium” is subcategories for parent categories “Aquarium”, but visual shown inside categories “Fish” (which is equal to categories “Aquarium” in categories hierarchy),
    I use red margin and some shift to show it.

    Logically, it must more good look in the same way, but inside categories “aquarium”

    Problem is:

    if we have (for example) two categories with same level, and first of them have a subcategories, then second categories box will start not after the last subcategories of first categories box, but exactly after first categories box.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter dmytron

    (@dmytron)

    wordpress 2.8.1
    categories code:

    <div class="sidebar-box">
    <h3>Categories</h3>
    <ul>
    <?php wp_list_cats('sort_column=name&hierarchical=1'); ?>
    </ul>
    </div>

    Thread Starter dmytron

    (@dmytron)

    up

    Did you realise that if you bump posts, you actually reduce your chances of anyone responding?

    What version of WP are you using? wp_list_cats is deprecated in favour of wp_list_categories.

    Thread Starter dmytron

    (@dmytron)

    Why? Answer for this post will help for many others.

    I use wp 2.8.1 – it shown in my post.

    Thread Starter dmytron

    (@dmytron)

    if I use a wp_list_categories instead of wp_list_cats i get same result.
    As I said – this is WordPress logic bug.
    Because box for next equal in the rang categories start exactly after previously categories, and not check – we have or not have subcategories for previously categories.
    This is problem must be solve for all, not only for me.

    you are missing a ul tag in front of your primary categories…it’s there for the first but not for the ones after that.

    Thread Starter dmytron

    (@dmytron)

    not – it is not missing and this is for all, not only for first.
    as I said – it is logical bag of WordPress

    Thread Starter dmytron

    (@dmytron)

    please help

    Here is what is being generated

    div class="sidebar-box"><!-- AVH Extended Categories version 2.0.3 | http://blog.avirtualhome.com/wordpress-plugins/ -->
    
    <h3>Categories</h3>
    
    <ul>	<li class="cat-item cat-item-18"><a>Aquariums</a>
    </li>
    <ul class='children'>
    	<li class="cat-item cat-item-20">Brackish aquarium
    </li>
    	<li class="cat-item cat-item-21">Freshwater aquarium
    </li>
    	<li class="cat-item cat-item-19">Seawater aquarium
    </li>
    </ul>
    </li><--------------should be a <ul>
    	<li class="cat-item cat-item-5"><a>Fish</a>
    </li>
    </ul>
    </div>

    the error is that the /li should be a ul

    I used your code in a test blog and it works correctly under 2.8.1

    Perhaps the problem is in your extended categories plugin

    Thread Starter dmytron

    (@dmytron)

    Yes!Exactly! It should be!
    But – this problem is not a part of plugin or theme – it part of WordPress!
    Because it coming with any theme and any plugin.
    I can show it, if it is necessary.

    the wierd thing about this is that I took your code and placed it on my 2.8.1 site and it worked fine.

    viceng.net

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Logic problem in categories displaying’ is closed to new replies.