I've created a custom post type called
video and I'm using a plugin called
Playlist_Order (which changes the
menu_order field) to allow the user to use a drag and drop interface to order their videos in a playlist.
However, when adding a new post the video appears at the top of the playlist because it's given a default
menu_order value of
On creation of a new video post I would like it to appear last in the playlist - i.e. query all
video post types, find the largest
menu_order value and then set this
+1 for the new post.
How can I implement this?