Home / Forums / WoodMart support forum / Product Categories Order in Header Search Dropdown
Home › Forums › WoodMart support forum › Product Categories Order in Header Search Dropdown
Product Categories Order in Header Search Dropdown
- This topic has 10 replies, 2 voices, and was last updated 2 months, 1 week ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
April 21, 2026 at 3:18 pm #716571
granule.petshopParticipantHello,
I have a question regarding the product categories dropdown in the header search field.Currently, the categories in the dropdown are displayed in alphabetical order. However, I would like them to follow the default order defined in Products → Categories (i.e., the custom/manual order set in WooCommerce).
I want the category “Psi” to appear first (along with its subcategories), as it is positioned in my category structure (Products -> Categories), instead of being sorted alphabetically where “Mačke” appears first.
Is there a way to:
* Display categories in the dropdown according to their custom order (menu order) instead of alphabetical order?
* Or override this behavior via theme settings, hooks, or filters?If not available by default, is there a recommended workaround?
Thank you in advance!
Best regards,
DejanAttachments:
You must be logged in to view attached files.April 22, 2026 at 8:34 am #716625Hello,
Option “show category” will show the categories menu generated automatically based on all existing categories in the shop. Sorry there is no option in theme settings to change the order. It requires customizations and this is beyond our limitations and support policy.
You need to edit the theme files for this. All the customizations made in the theme files are at your own risk.
inc/modules/search/class-ajax-search.php
Best Regards
April 22, 2026 at 1:03 pm #716654
granule.petshopParticipantHello,
Thank you for your previous reply.
I would like to avoid modifying theme core files (such as class-ajax-search.php), as this is not update-safe.
My goal is very specific:
I need the product categories in the header search dropdown (category selector) to follow the order defined in WooCommerce → Products → Categories (custom order / menu order) instead of alphabetical order.Could you please clarify:
1. Is there any filter or hook available to modify the categories query used in the header search dropdown?
2. If not, is there a recommended child-theme-safe override for this specific functionality?
3. Or is this currently not customizable without editing core theme files?I am only targeting the header search category dropdown, not global category ordering.
Thank you in advance.
Best regards,
DejanApril 22, 2026 at 1:33 pm #716658
granule.petshopParticipantTo clarify:
I only want the order of all categories in the header search dropdown to match the order already defined in WooCommerce → Products → Categories (custom order / menu order), instead of alphabetical order.So I am not asking for a custom manual sorting solution just for the header.
I only want the dropdown to inherit the existing WooCommerce category order.If there is a filter, hook, or child-theme-safe way to make the header search category dropdown respect that existing category order, please let me know.
Thank you.
April 22, 2026 at 4:20 pm #716698Hello,
Unfortunately, it is not possible. Such modification requires complicated WooCommerce code customization, which is not covered by our support.
If you want to edit the theme file directly, then you need to copy the inc/modules/search/class-ajax-search.php file from the main theme to the child theme and then try to customize it.
Best Regards
April 22, 2026 at 6:54 pm #716720
granule.petshopParticipantHello,
I think there may be a misunderstanding, so I would like to clarify.
I am not referring to AJAX search suggestions or category suggestions while typing in the search field.
I am referring only to the static category selector dropdown in the header search form – the dropdown attached to the “All categories” (SVE KATEGORIJE) field.
So the issue is only this part:
* the static dropdown that lists all product categories in the header search form
* not the live search suggestionsI would like this static header search category dropdown to follow the existing WooCommerce category order from:
WooCommerce → Products → Categories
instead of alphabetical order.
Could you please confirm whether the file/method responsible for this static dropdown is really inc/modules/search/class-ajax-search.php, or if it is located elsewhere?
I attached a screenshot and marked the exact dropdown I mean.
Thank you.
Best regards,
DejanAttachments:
You must be logged in to view attached files.April 23, 2026 at 1:58 pm #716774Hello,
Please try to use the Simple custom post order plugin and then manage the product categories order from Product >> Categories section, then it will show the same order on the frontend in the categories dropdown.
https://wordpress.org/plugins/simple-custom-post-order/
Best Regards.
April 23, 2026 at 4:06 pm #716788
granule.petshopParticipantHello,
Thank you for your suggestion.
I tried using the Simple Custom Post Order plugin as recommended, but unfortunately it caused serious issues:
* After reordering product categories, products disappeared from main shop page (https://granule.rs/prodavnica/)
* The plugin does not properly handle hierarchical structures (subcategories are not preserved when reordering parent categories)
* Overall, it breaks the existing WooCommerce category structure and display logicBecause of this, it is not a viable solution in my case.
Also, I would like to clarify something important:
WooCommerce already provides a native drag & drop (menu order) functionality for product categories under:
Products → CategoriesMy expectation is simply that the header search category dropdown respects this existing WooCommerce category order.
At the moment, it seems that WoodMart ignores the default WooCommerce category ordering and forces alphabetical sorting instead.
So my question is:
👉 Why is the theme not using the native WooCommerce category order (menu_order) for this dropdown?
👉 Is there any way to make the header search category selector follow the default WooCommerce ordering without using third-party plugins or modifying core theme files?I am only trying to use the built-in WooCommerce functionality, not introduce a new ordering system.
Thank you in advance for your clarification.
Best regards,
DejanApril 24, 2026 at 1:16 pm #716848Hello,
At the moment, we don’t have functionality that allows changing the order of items in the dropdown search form. However, we can offer you an alternative solution to achieve the desired result.
You can add the following CSS code to the theme settings, and in this case, the “Psi” category will appear first:
.wd-dropdown-search-cat .wd-sub-menu { display: flex; flex-direction: column; } .wd-dropdown-search-cat .cat-item-48 { order: -1; }Best Regards.
April 24, 2026 at 1:23 pm #716849
granule.petshopParticipantPerfect, this works 🙂
Thank you very much!April 24, 2026 at 2:04 pm #716857Hello,
You’re Most Welcome!
Feel free to write back anytime. If you need further assistance, we are always here to help you.
If you have a minute, we’d truly appreciate your feedback — it helps us improve the product and shape future updates more effectively. We’d love your feedback on our theme: https://tally.so/r/w4l54k
Thanks for contacting us.
Have a great day.Topic Closed.
Best Regards. -
AuthorPosts
The topic ‘Product Categories Order in Header Search Dropdown’ is closed to new replies.
- You must be logged in to create new topics. Login / Register