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

Have a custom taxonomy "guest" with extra fields.

    foreach ($extra_fields as $field => $display) { ?>
    <tr class="form-field">
    <th scope="row" valign="top"><label for="<?php echo $field;?>"><?php echo $display;?></label></th>
    <td><input type="text" name="<?php echo $field;?>" id="<?php echo $field;?>" /></td>

There are 10 extra fields per taxonomy. Can I / should I save these as an array so each "guest" has 1 entry in the guestmeta table instead of 10 entries? Retrieval of the data is also a concern.

update_metadata('guest', $term_id, 'guest_meta', array($field1 => $value1, $field2 => $value2));  


foreach($extra_fields as $field => $value){
  update_metadata('guest', $term_id, $field, $value);  }
share|improve this question

closed as not a real question by Rarst Oct 8 '12 at 20:50

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

You are presenting a choice between two valid approaches without any criteria to choose by. Simply put - either works. Which to go with depends on specific needs of the project. – Rarst Oct 8 '12 at 20:49