I’m using WordPress as a CMS and would like to have categories selectable from multiple selections i.e <option>
.
As a usage example, The first dropdown would contain parent categories. Then after selecting the parent a second select drop-down would appear with the child categories. There are a few plugins available on WordPress.org but they all seem to be broken or out of date. Any help would be appreciated.
Broken plugin http://wordpress.org/extend/plugins/ajax-category-dropdown/
The code I’m using from wordpress.org
<form action="<?php bloginfo('url'); ?>/" method="get">
<?php
$select = wp_dropdown_categories('orderby=name&echo=0&depth=0&hierarchical=1&exclude=5,4');
$select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select);
echo $select;
?>
<noscript><input type="submit" value="View" /></noscript>
</form>
For displaying the the drop-down menus use the
parent_child_cat_select()
function.Could use some polishing, but should work.