Categories filter in search form in Advanced header.

This topic has 4 replies, 2 voices, and was last updated 7 years, 4 months ago ago by Olga Barlow

  • Avatar: webbrouwer
    webbrouwer
    Participant
    December 1, 2016 at 11:04

    Hey,

    For a site I’m building there are a lot of categories and sub-categories. They are al shown in
    the filter in the searchform in the header.

    I only want to show the top level parent categories. Could you help me out setting this up?

    Looking forward to your reply.

    Cheers Mickey.

    3 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 2, 2016 at 11:10

    Hello,

    You can try to change it by additional customization of our search form. Copy file xstore/woosearchform.php into child theme folder and edit the parameters of wp_dropdown_categories http://prntscr.com/deeh9l

    Regards

    Avatar: webbrouwer
    webbrouwer
    Participant
    December 2, 2016 at 16:09

    Hey olga,

    Thank you for taking the time to answer my question. I found the solution with your tips as starting point.

    I’ve put: ” ‘depth’ => 1 ” in the paramaters of the function you pointed me at.

    Cheers,

    Mickey

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 2, 2016 at 16:41

    Hello,

    I’m glad that my answer was helpful. Feel free to ask if you need any other help.

    Regards

  • Viewing 4 results - 1 through 4 (of 4 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.