I want to use a custom menu from the wordpress database but I get the elements disordered and I want them to have the same order how can i do that? There is a place in the database where the order is stored?


2 Answers 2


You will get the nav_menu_items from wp_term_relationship in correct order. if you want to confirm there order by knowing there order number... u will get the object id of each item from the previous table and search for that id in wp_posts. then there will be column for that particular row named menu_order. so that u can get the actual order number.


old post but a weird answer, maybe this is more current: fields for a post are either in the wp_posts table or the wp_postmeta, the one for menu_order is in wp_posts.

You can use the menu_order sorting for products in a shortcode like this:

[products order_by="menu_order" order="DESC" limit="-1" per_page="24" paginate="true"]

In my case, I imported products and their import order wasn't the same as the original date created. So by populating menu_order and using that shortcode I'm able to show a list new product releases in the correct order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.