[Help] Wordpress Code

twisted_one

Power Member
Joined
Oct 11, 2009
Messages
509
Reaction score
89
<li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
<?php wp_list_categories('depth=1&hide_empty=0&orderby=name&order=ASC&title_li=' ); ?>
This code means that the header will have links like

HOME | <Category Names>

My problem is

When I have a Sub Category, it is not displayed when I hover my mouse over the parent category. For example, say there is a Category MAIN with two subcategories SubA and SubB. I want SubA and SubB to be displayed when I hover my mouse over MAIN.

How can do this?

I tried this code

<li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
<?php wp_list_categories('depth=1&hide_empty=0&orderby=name&order=ASC&hierarchical=true&title_li=' ); ?>
This displays the subcategories SubA and SubB only when I click on MAIN and not when I hover on MAIN category.

Any help on how to achieve this?
 
Top