我找到了:D Yeeeeeeeaaahhhhh:)))
这是最后一个有效的代码!我解释了每个级别;)
/* for get author ID use these */
$curauth = (isset($_GET[\'author_name\'])) ? get_user_by(\'slug\', $author_name) : get_userdata(intval($author));
$author_id = get_the_author_meta(\'ID\');
/* First condition */
if( get_the_author_meta(\'management_certi\', $author_id, true)) {
/* get file ID */
$id = get_user_meta( $author_id, \'management_certi\');
if($id) {
/* Array Loop! */
foreach($id as $attachments) {
/* get file URL */
$url = wp_get_attachment_url( $attachments ); ?>
<a href="<?php echo $url; ?>" data-lightbox="image-1" data-title=""><img src="<?php echo $url; ?>" class="thumbnail" width="36" height="36" /></a>
<?php
}
}
} else { echo \'--\'; }