[wp-hackers] CPT with post_title names
charles.freesmelvin at me.com
Tue Aug 16 20:19:14 UTC 2011
The simplest way would be to have a list of prefixes and suffexes on a "safe list" and process that first, then take the last group and assign it as surname and use the beginnings as given names. If there is only one then treat it as surname.
Charles E. Frees-Melvin
charles at cefm.ca
Sent from my Rogers iPhone 3G
On 2011-08-16, at 17:13, Tom Barrett <tcbarrett at gmail.com> wrote:
> Using custom post types for profiles of various types, I'm never sure how to
> handle post titles as names, People could have any number of names, as well
> as honourifics. It's trivial to just drop it in the title, but a list (or
> archive) page, you may want them ordered by their last name. Has anyone
> tackled this before?
> There seems to directions. Either a) build custom fields for all the
> individual parts and make the post title myself, or a) do something clever
> with the post title to split into it's parts. Users may find the former to
> be a bit clunky, and I can't think of a clever way to do the latter.
> Example names might be:
> Andy Apple
> Dr Beverly Books
> Mr Cricket, Esq
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers