wp_dropdown_categories broken with 2.0.4.5
-
My theme (Karma) has a widget that displays a dropdown list of post categories but after updating to v 2.0.4.5 of this plugin the dropdown list was replaced with a label “Select category”. I have tested a number of permutations of WordPress versions, theme versions and plugin versions and the consistent factor is that 2.0.4.5 breaks the dropdown. (WordPress versions tested: 4.1.4 and 4.2.1; theme versions tested 4.0.4 and 4.3; plugin versions tested 2.0.4.3 and 2.0.4.5).
I also tested this in Twenty-Fifteen and created a new page template where the dropdown works with 2.0.4.3 but fails with 2.0.4.5.
My categories are very simple in structure: A, B as parent categories and category B has six child categories ie
A
B
-1
-2
etcAt the moment I have amended our site so that the widget no longer displays a dropdown list of categories so as to avoid users reporting it as an issue.
The page template for 2015 is
<?php /** * Template Name: Category list */ ?> <h1>Drop down list test</h1> <?php $cat_args['show_option_none'] = _e('Select Category','truethemes_localize'); wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args)); ?> <script type='text/javascript'> /* <![CDATA[ */ var dropdown = document.getElementById("cat"); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = "<?php echo home_url(); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; /* ]]> */ </script>
- The topic ‘wp_dropdown_categories broken with 2.0.4.5’ is closed to new replies.