posts SET menu_order='$position' WHERE ID='$pageid'"; //setup db query $wpdb->query($postquery); //update pages in db $position += 1; //increment position var endforeach; update_option("exclude_pages", $value = $_GET['exclude'];, $description = 'PageMash: Pages to not show in menu.', $autoload = 'yes'); echo "pagemashed"; ?>