WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I'm trying to do is allow registered users to create a list of gift items they would like for Christmas. So I've created a custom post type called 'gift' and a custom taxonomy of 'list' but I can't figure out how to relate the 'list' to the user. I would like to allow users to create multiple lists, but I can see a problem where 2 users may create the same list name and therefore causing headaches on which list belongs to who.

Have I set this up the right way? What would you do differently?

share|improve this question

You have the user id# that uniquely identifies the user. So prepend the user id value to the list name the user chooses, to save the list value. For example, if user #1234 creates a list called xmas, then do

$args = wp_insert_term ('1234_xmas', 'list');

Next add a custom field to the user. And store 'xmas' into that field. See: http://justintadlock.com/archives/2009/09/10/adding-and-using-custom-user-profile-fields

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.