[wp-hackers] CPT with post_title names

Helen Hou-Sandi helen.y.hou at gmail.com
Tue Aug 16 20:30:18 UTC 2011


I've done this for faculty and alumni listings and found it best to make a
custom metabox with custom fields for the individual parts of names and use
those when doing a directory/archive while continuing to use the post title
and permalink as usual for ultimate control. It kind of depends on how much
control you really want to have and how specific/guided you need to get for
whoever is doing the creation/editing of the profiles, but for me and for
the users that ended up being the best route despite being a little more
work. Some people want to be listed with a middle initial without
punctuation but still be searchable by the whole thing, or somebody likes to
have their nickname in quotes, etc. Unless you know that your users are only
ever going to have one last name or one suffix or no middle names or no
punctuation (and there is no such thing as always knowing your users), you'd
be better off steering clear of trying to parse names. I'd bet that the
amount of time you'd spend trying to be clever would be way more than just
entering text into a few extra boxes :)

--
Helen Hou-Sandi
http://www.helenhousandi.com



On Tue, Aug 16, 2011 at 3:13 PM, Tom Barrett <tcbarrett at gmail.com> wrote:

> Hi
>
> 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
>
> --
> http://gplus.to/tcbarrett
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list