Add menu order attribute to WordPress posts

Add following code to your themes functions.php file.