Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

I want unique post title in wordpress. How do I do it?

user-image
Question ajoutée par Muhammad Majid Saleem , Senior PHP Developer / Project Manager , SwaamTech
Date de publication: 2013/10/24
Atif Aqeel
par Atif Aqeel , Founder And Director , Xesense

// Builds complete user id function build_home_id ($pcode_id, $assigned_id_no) { //$cmplt_id = $pcode_id . "-" . number_pad($assigned_id_no,3); // Gets postcode string and calls the number padding function to add the leading0's do { $cmplt_id = $pcode_id . "-" . number_pad($assigned_id_no,3); // Gets postcode string and calls the number padding function to add the leading0's $assigned_id_no++; // Increase assigned_id_no $existing = get_page_by_title($cmplt_id, OBJECT, "patient"); $existing_post = $existing->post_title; } while($cmplt_id == $existing_post); // Restart loop if built id matches any already in existance return $cmplt_id; }

Shahbaz Awan
par Shahbaz Awan , M2M IoT Software Architect , Wadi Makkah

will you please elaborate a bit, your question not clearly specify what to do?

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?