• New to wordpress, been using it 1 day, coming from a heavy Joomla background.

    I want to be able to attach more information to users (via meta data), that’s fine, i have those fields on the new user and profile pages, but some of the information needs a drop down list that I don’t want to pre-define.

    e.g.
    having a drop down Mr. or Mrs. box.

    I obviously don’t want to hard code Mr. and Mrs., so I’d like a place to edit these in admin, also allowing the user to customize the list and add Dr. for instance or whatever else.

    Is it taxanomy’ that I want to define here?

    Also, any examples of listing these custom taxanomy’ in a listbox?

Viewing 6 replies - 1 through 6 (of 6 total)
  • If they are user added for their own profiles, use text box?

    I’d probably say adding them into a dropdown select would be easier though.

    Thread Starter masonify

    (@masonify)

    I don’t want the users to be able to create new taxanomy’s

    If I give them a text box, they could create a new one that is not allowed e.g. Mister when they should be selecting Mr. created by the administrator.

    Moderator bcworkz

    (@bcworkz)

    You don’t want to use a taxonomy for this, though you could. You just need an array of string values stored in options from which to populate a dropdown. Then have a meta box or something where admins can add or delete values as the need arises.

    You can’t have it both ways. To let a user customize the list, they will do something not allowed! To prevent this, you must limit choices and will most likely miss some title important in some culture you’re unaware of.

    Thread Starter masonify

    (@masonify)

    Thanks for the poke in the right direction, that’s what I was looking for, in database terms, normalization.

    I’m good with the meta box on user pages populated by an array, I’m assuming WP has a function to define new options and call those values out etc, I’ll check the codex. Thanks for the help.

    Thread Starter masonify

    (@masonify)

    any examples of an admin page that manages an array of values to add edit delete, possibly change order would be greatly appreciated, although I thank you for the direction, I just need to know I’m doing it in the most conventional way, without hacking the core.

    It’s tough to learn a new system, and I’m tempted to just dive in and write a completely custom php program to hack into the page, but the whole reason I’m attempting the move to WP is because of their update system version to version, so that would be sort of counter productive.

    Thanks again bcworkz, bc as in West Coast Can.?

    Moderator bcworkz

    (@bcworkz)

    Sorry, no examples come to mind. What you do depends on what page you want to modify. Some pages have a number of actions you can hook and output arbitrary HTML. Then you need to find another hook that fires when the form is submitted so you can handle your custom elements. If there’s no submit hook to be found you can use AJAX to transmit the data, but you must find an initial action or filter to output the form elements in the first place. If not, you could inject the HTML using jQuery, or abandon the existing page idea and create a new admin page for your plugin.

    Nah, not B.C. Can. (though I’m pretty close in Seattle). It’s a distant local reference (not even in WA) for a business I used to run – Butler Creek Works. It was a long time ago, anything that comes up in Google is someone else.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is it Taxanomy' that I want to create for user categories’ is closed to new replies.