admin管理员组文章数量:1128522
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?
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?
Share Improve this question asked Jul 30, 2014 at 11:41 Raúl Álvarez HinojosaRaúl Álvarez Hinojosa 31 silver badge2 bronze badges 2 |2 Answers
Reset to default 3You 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.
本文标签: Where is the order of a menu saved in the database
版权声明:本文标题:Where is the order of a menu saved in the database 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736726245a1949745.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
{prefix}_posts
table, they would also use themenu_order
column. – karpstrucking Commented Jul 30, 2014 at 11:58