Installed a plugin that allows the re-ordering of posts from any post type / category / tag using a drag/drop interface.
After some time of using, my post order went haywire and new posts began to appear in a jumbled order. The plugin’s native reset button resolved this, but the old posts are still jumbled (only for two particular categories).
Plugin author suggested updating menu_order to 0 only for the post type in question and I have a few questions:
- I can’t seem to find the appropriate field, which table would I look in?
- Post types just cover posts, pages and all custom post types, right? If I’m only having this issue with a category, I still have to reset the menu_order of the entire parent post type?
- I see the menu_order filter in the Codex, but I thought this was only for top level menu order, not the order of actual posts?
This piece of mySQL code should do the trick. Go into PHPmyAdmin, click the SQL tab and paste this code:
This should set
menu_order
for all posts of the post type of your choice to 0.menu_order
is one of the columns in the*_posts
table. In my dev database it only seems to be used for thenav_menu_item
post type, but I haven’t looked into it very carefully.I am not sure about the connection to your categories. When I add a category, it is added to the menu as a
nav_menu_item
. Presumably that is how things work on your site too, unless someone has done something weird.I don’t think that altering that value will break anything. When I tested the menus just reordered but that is it. Make backups and test it on dummy data first.