Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

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

user-image
Question added by Muhammad Majid Saleem , Senior PHP Developer / Project Manager , SwaamTech
Date Posted: 2013/10/24
Atif Aqeel
by 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
by 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

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.