In search of a working category list dropdown
-
Following advice in another thread, I added this to my index.php file:
<li id="categories"><?php _e('Categories:'); ?>-
<form name="catform"; onchange="window.location = 'index.php?cat='+(document.forms.catform.cat[document.forms.catform.cat.selectedIndex].value);">
<?php dropdown_cats(); ?>
</select>
</form>
Unfortunately, it didn’t work for me. Clicking on one of the category names didn’t do anything. I also tried this:
<li id="categories">Categories:
<form name="categories">
<select name="menu" onChange="MM_jumpMenu('parent',this,0)">
<option selected value="">Select Category</option>
<?php dropdowncats_option('name','desc',0,1,1); ?>
</select>
</form>
Although asthetically more pleasing, this second form didn’t do anything either. I would like to just have a user click on the category and be taken to the corresponding page, without having to click on a submit button.
Ideally, but not of paramount importance at this point, I would like the subcategories displayed under their parents, with the number of posts in each category following it.
Can anyone help me out with this, or head me in the right direction to solving this problem?
- The topic ‘In search of a working category list dropdown’ is closed to new replies.