Dropdown category don’t reset to first option
-
Hi,
I’ve this code to show categories in dropdown way:
<form action="<?php bloginfo('url'); ?>" method="get"> <?php $select = wp_dropdown_categories('show_option_none=Select an option&show_count=1&child_of=5&echo=0'); $select = preg_replace("#<select([^>]*)>#", "<select$1 onchange='return this.form.submit()'>", $select); echo $select; ?> <noscript><input type="submit" value="Ver" /></noscript> </form>
It works fine except a single detail: It don’t reset to ‘show_option_none’ once the category is clicked.
For example, I have this structure:
– Select an option
— Countries
— Towns
— StreetsWhen I click “Towns”, the form remains in “Towns”. I can refresh the page, clean chache & cookies and the %&#@$! list remains in “Towns”, when it must to be reset to “Select an option”. Which would be a solution for this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Dropdown category don’t reset to first option’ is closed to new replies.