This topic has 2 replies, 2 voices, and was last updated 6 years, 10 months ago ago by Rose Tyler
Hello,
I would like to have the categories in my sidebar always expanded. Is that possible?
Thank you very much in advance!
Hello,
I hope you are well today and thank you for your question.
It is possible via changes in files. You need to create etheme-child.js file in your child theme with this code:
jQuery(document).ready(function(){
setTimeout(function(){
var etcats = jQuery('.product-categories');
var minusicon = '–';
var subItem = etcats.find('.open-this');
if (subItem.length) {
jQuery(subItem).html(minusicon).parent().addClass('opened').find('> ul, > div.nav-sublist-dropdown').slideDown(100);
}
},100);
});
Also, use this code in function.php file of the child theme http://prntscr.com/i1knqa:
wp_enqueue_script('child-theme', get_stylesheet_directory_uri().'/etheme-child.js',array(),false,true);
Regards
You must be logged in to reply to this topic.Log in/Sign up