Display Child Category
Author | Posts |
---|---|
December 4, 2013 at 11:47 am 13261 | |
Brennen | Hello support we want to display all the category as check box input, we have more than 250 categories having child parent relationship, so we need to display child categories only when parent category will be selected, so initially it will be a parent category list as check boxs and if any on the parent is selected we need that corresponding child category will start displaying. Thanks |
December 4, 2013 at 1:49 pm 13268 | |
Tareq Hasan | Paste this to your themes [php] ul.find(‘ul.children’).hide(); ul.on(‘click’, ‘input[type=checkbox]’, function(e) { if ( child.lengh !== 0 ) { add_action( ‘wp_footer’, ‘wpufe_show_hide_checkbox’ ); |
December 4, 2013 at 3:27 pm 13279 | |
tbangun | Thanks Tareq, Works great 🙂 |
January 1, 2014 at 4:23 am 14080 | |
Brennen | Hey Tareq this works great, one question: Can you update it so that if a parent is already checked the children show for that checked category only? So basically on page load check if any parent categories are checked and if they are, show the children categories. |