Home Forums WoodMart support forum How to show only parent category in the search bar

How to show only parent category in the search bar

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #177140

    woodm101
    Participant

    Hi there,
    Please Guide, How to show only parent category in the search bar => https://prnt.sc/r9g1xn

    Thank You!

    #177145

    Hello,

    I saw the screenshot you attached. Unfortunately, There is no option in Theme settings available to hide subcategories from the search bar drop down. To hide the category from the search dropdown you need to add the following custom CSS code in the Global Custom CSS area under Theme Settings >> Custom CSS.

    .search-by-category .cat-item-73 { display: none; }

    You can replace the ID 73 by your desired once that you want to remove from the search bar.

    Best Regards.

    #177147

    woodm101
    Participant

    Thanks for your quick support.

    I have almost 120 categories in which I have to show only 7 categories.

    Please tell me if there is some other way to do this.

    THANK YOU!

    #177156

    Hello,

    Unfortunately, There is no other way that you can hide the subcategories from the search bar dropdown.

    It requires customization and this is beyond our limitations and support policy.

    Best Regards.

    #203244

    ionixcorp
    Participant

    Hello, if it is helpful for those who have the same problem and decide to hide the subcategories of the search bar located in the header, they can use the following code.

    .search-by-category .children { display: none; }

    add it to global custom css.

    I hope it serves whoever needs it.

    #203451

    Hello,

    I have provided you with the CSS to hide specific categories from the search.

    But you asked about some other way to hide because you have 120+ categories. The code you provided will remove all the categories.

    By the Way it Sounds Good!!

    That you have managed the solution for yourself. Your solution might be useful for someone else
    who are facing the same issue.

    Let us know if there’s anything else we can do for you! You can always reach us at any time. We are always here to help you.

    Have a wonderful day.

    Topic Closed.
    Best Regards.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘How to show only parent category in the search bar’ is closed to new replies.