How to generate random numeric slugs for a custom post type?
function wpse_18293_get_random_string ($number_of_chars_to_use) { $upper_case_charachters = range(‘A’, ‘Z’); while($cnt < $number_of_chars_to_use) { $random_string.= $upper_case_charachters[mt_rand(0, count($upper_case_charachters)-1)]; $cnt++; } return $random_string } $random_string = wpse_18293_get_random_string(’10’); The ’10’ can be any number, and the function will pass back a string of random charachters that many charachters long. Note, the function name can be anything you want, I named … Read more