Ah. I gotcha now. Drupal has no internal automagic way of knowing any connection between your author name and photo fields. But, for display purposes at least, you can show them together by hacking at the CCK field template.
If you go into CCK module's directory, you will find a content-field.tpl.php
file. Copy it into your theme's directory and then COPY it to content-field-field_author_photo.tpl.php
, eg, based upon the field name of your author's photo field name. It is imperative that you COPY it, not just rename it, CCK needs both the base template and the specific field one.
By default, this bad boy looks like this:
<?php if (!$field_empty) : ?>
<div class="field field-type-<?php print $field_type_css ?> field-<?php print $field_name_css ?>">
<?php if ($label_display == 'above') : ?>
<div class="field-label"><?php print t($label) ?>: </div>
<?php endif;?>
<div class="field-items">
<?php $count = 1;
foreach ($items as $delta => $item) :
if (!$item['empty']) : ?>
<div class="field-item <?php print ($count % 2 ? 'odd' : 'even') ?>">
<?php if ($label_display == 'inline') { ?>
<div class="field-label-inline<?php print($delta ? '' : '-first')?>">
<?php print t($label) ?>: </div>
<?php } ?>
<?php print $item['view'] ?>
</div>
<?php $count++;
endif;
endforeach;?>
</div>
</div>
<?php endif; ?>
and basically it wraps a CCK content field with lots of CSSable divs and so forth. What you want to do is print out the author name under each photo, so you could do that by replacing the print $item['view']
(which is your photo) with something along the lines of this:
<?php print $item['view']; ?>
<?php if (!empty($node->field_author_name[$delta]['value']): ?>
<div class="author-photo-caption">
<?php print check_plain($node->field_author_name[$delta]['value']); ?>
</div>
<?php endif; ?>
And now when CCK builds this field, it will also grab the author name and put it under the photo. It will of course still build the author name field and display it, so if that's not what you want, you can go in the Display Fields section of the node type config and exclude it from the $content variable and then it will only show up here.
Clear caches/theme registry and style up the author-photo-caption class and you should be set. And now wherever this field is displayed, it will grab its counterpart (assuming no typos above :)
(Other assumptions: field_author_photo
and field_author_name
are the names of your fields on your system.)