This topic has 9 replies, 3 voices, and was last updated 10 years, 1 months ago ago by Eva Kemp
Below is screen shot graphic link showing that the first category will auto display any sub categories. How can I turn off all categories including the first category from auto display sub categories? Please view the screen shot below.
In other words I only want that + symbol visible on ALL categories. I want the viewer to have to click the + symbol in order to see the hidden sub categories.
Hello,
To close first category, edit wp-content/themes/royal/js/etheme.js file. Find and comment out line 1389
etCats.find(‘>li’).first().find(‘.open-this’).html(minusIcon).parent().addClass(‘opened’).find(‘ul.children’).show();
Regards,
Robert Hall.
I realize that sounds easy for you but I’ve never done any coding. Could you please take a minute and do it for me? I’ve provided you everything you need. I would really appreciate it!
Ron
I just tried to locate that line of code you said needed commented out and that line of code does not exist in that js file?
Watch this video
http://helloron.com/royal092914/
Please help.
Also how do comment out a line of code?
Thank you.
Ron
I think this is the section of code you were referring to at line 1517
var etCats = $(‘.product-categories’);
$this.addClass(‘with-accordion’)
var openerHTML = ‘<div class=”open-this”>’+plusIcon+'</div>’;
I tried this … (added // to the 3rd line of section)
var etCats = $(‘.product-categories’);
$this.addClass(‘with-accordion’)
// var openerHTML = ‘<div class=”open-this”>’+plusIcon+'</div>’;
That hid both all sub categories even the + signs below?
Help
Ron
Below are the logins…
Hello,
Sorry for a long delay.
I’ve commented out code on line 1526 in etheme.js file.
$this.find('>li').first().find('.open-this').html(minusIcon).parent().addClass('opened').find('ul.children').show();
Now it’s work. You can check it.
Regards,
Robert Hall.
Perfect. May I suggest you include this in all future theme updates? I see how you commented this line out (Thank you) but I think this layout makes more sense then having the first category in the expanded view by default. To me that makes no sense at all. The first category is the first category just because the first letter is the higher in the alphabet. Why does that suggest that category should be expanded by default while all the others are not. Regardless, thank you.
Hello,
Thank you for the suggestion. We’ve taken this into account and perhaps it will be included in the future updates.
Thank you.
Regards,
Eva Kemp.
The issue related to '‘How can set all categories not to auto display sub categories?’' has been successfully resolved, and the topic is now closed for further responses