How to have product categories toggled to Open as default

This topic has 16 replies, 4 voices, and was last updated 10 years, 5 months ago ago by Eva Kemp

  • Avatar: gpexpert
    Tim
    Participant
    July 24, 2014 at 22:32

    Hello,

    I’d like to have the product Categories set to be open, showing the sub-categories, as default. So when a user lands on a product page they see both top-level categories and the sub-level categories, without needing to click the toggle (+) button.

    Thanks.

    Tim

    Please, contact administrator
    for this information.
    15 Answers
    Avatar: Robert Hall
    Robert Hall
    Support staff
    July 25, 2014 at 06:48

    Hello,

    To open all category, edit wp-content/themes/legenda/js/etheme.js file. Find line 1389
    etCats.find('>li').first().find('.open-this').html(minusIcon).parent().addClass('opened').find('ul.children').show();

    and replace on
    etCats.find('>li').find('.open-this').html(minusIcon).parent().addClass('opened').find('ul.children').show();

    Regards,
    Robert Hall.

    Avatar: gpexpert
    Tim
    Participant
    July 26, 2014 at 15:54

    Excellent, that worked when I updated the core theme file. But when I first tried to create a js folder in my child theme with the updated etheme.js file it didn’t work. Is that normal behavior? If so I guess I’ll just need to make sure that file doesn’t get overwritten when the theme is updated?

    Tim

    Avatar: Eva
    Eva Kemp
    Support staff
    July 26, 2014 at 17:08

    Hello,

    Please read this article how to add sub files in a child theme:
    http://codex.wordpress.org/Child_Themes > Referencing / Including Files in Your Child Theme

    Regards,
    Eva Kemp.

    Avatar: gpexpert
    Tim
    Participant
    July 27, 2014 at 00:12

    Thanks I’ll look into that. But just noticed the toggle menuas aren’t always opening. For example if I go to a category page only that category opens.

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    July 27, 2014 at 13:31

    Hello,

    Do you wish to have the second category in sidebar opened by default?

    Regards,
    Eva Kemp.

    Avatar: gpexpert
    Tim
    Participant
    July 27, 2014 at 15:54

    yes, basically have all top level categories opened by default. So even if I add another it will also be opened. The code you provided does work but not on all types of pages I guess.

    Avatar: Eva
    Eva Kemp
    Support staff
    July 28, 2014 at 08:30

    Hello,

    Please provide us with FTP credentials.
    Thank you.

    Regards,
    Eva Kemp.

    Avatar: gpexpert
    Tim
    Participant
    July 28, 2014 at 17:06

    sure

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 28, 2014 at 18:08

    Hello,

    Could you please provide us with wp-admin credentials as well?

    Regards,
    Jack Richardson

    Avatar: gpexpert
    Tim
    Participant
    July 28, 2014 at 18:28

    yes

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 28, 2014 at 19:18

    One more thing: we’re unable to connect to your FTP account. Please check provided credentials!

    Regards,
    Jack Richardson

    Avatar: gpexpert
    Tim
    Participant
    July 28, 2014 at 20:40

    Sorry, I forgot to say its sftp, just checked and connections works with that.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 29, 2014 at 07:57

    Hello,

    We’ve made changes. Please check your product categories now!

    Regards,
    Jack Richardson

    Avatar: gpexpert
    Tim
    Participant
    July 29, 2014 at 16:08

    Great, that seems to work perfectly. Were the changes made in core files that will get overwritten in updates?

    Avatar: Eva
    Eva Kemp
    Support staff
    July 29, 2014 at 16:37

    Hello,

    You’re welcome.
    We didn’t edit the files, we made the changes in Theme Options > Shop > Enable Navigation Accordion > set to “Off”.

    Regards,
    Eva Kemp.

  • Viewing 16 results - 1 through 16 (of 16 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.