Multiple Instances of wp-dropdpwn_categories not working – any advice?
-
I am trying to list a bunch of ‘child of’ drop down category selects but when I duplicate one – it stops working – do I need to pass the multiple parent categories in an array? I am stumped.
<li id="categories"><h2><?php _e('Posts by Category'); ?></h2> <?php wp_dropdown_categories('show_option_none=Select category&child_of=130'); ?> <?php wp_dropdown_categories('show_option_none=Select category&child_of=126'); ?> <?php wp_dropdown_categories('show_option_none=Select category&child_of=127'); ?> <script type="text/javascript"><!-- var dropdown = document.getElementById("cat"); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = "<?php echo get_option('home'); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; --></script> </li>
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Multiple Instances of wp-dropdpwn_categories not working – any advice?’ is closed to new replies.