Customizing the display of the category drop-down menu

How can I customize the display of the category drop-down menu? The class names in the list of categories are clearly the same, but the IDs are always loaded so that it is impossible to bind to them. ListingHive theme. What to do?


​Please send more details about this question, and we will do our best to help you.

I need to customize the appearance of the drop-down list of categories in the search form. Now it’s a simple list with scrolling. CSS styles for this list are generated through a script. Tell me at least the path to the script in which I could configure the display. For example, I would like to hide the display of subcategories, because a large number of categories require long scrolling of the list. Or I would like the subcategories to also be drop-down lists when hovering over the parent category.

I will answer myself how to bind styles to elements with classes and identifiers that change when the page loads:

  1. You can change the style of the element
  2. by finding the beginning and end of the id, if its middle is constantly changing. Here is an example of CSS code that will find the menu item we need with the number 70,75… etc at the end:

  1. You can remove the generation of random characters for menu classes in the file wp-content\plugins\hivepress\node_modules\select2\dist\js\select2.full.min.js
    Here you need to find the use of the generateChars(4) or generateChars(2) function and delete it. But this is a method for more advanced users.
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.