<?php global $post; $author_id=$post->post_author; ?> <?php the_author_meta( 'first_name', $author_id ); ?> <?php the_author_meta( 'last_name', $author_id ); ?> <?php the_author_meta( 'description', $author_id ); ?>
lista parametrów:
<?php global $post; $author_id=$post->post_author; ?> <img src="<?php the_field('avatar','user_'.$author_id); ?>" class="author_icon" alt="Avatar"> <h6 class="post-author"><?php the_author_meta( 'first_name', $author_id ); ?> <?php the_author_meta( 'last_name', $author_id ); ?></h6> <?php $id = get_the_author_id(); ?> <h6 class="post-author"><?php the_author_meta( 'first_name', $id ); ?> <?php the_author_meta( 'last_name', $id ); ?></h6> <img src="<?php the_field('avatar','user_'.$id); ?>" alt="Avatar">
—
<?php $first_name = the_author_meta( 'first_name', $author_id ); ?> <?php $last_name = the_author_meta( 'last_name', $author_id ); ?> <?php if (($first_name !== "") && ($last_name !== "")): ?> <h4><?php echo $first_name; ?> <?php echo$last_name; ?></h4> <?php else: ?> <h4><?php the_author_meta( 'user_login', $author_id ); ?></h4> <?php endif; ?> <p><?php the_author_meta( 'description', $author_id ); ?></p> <?php $user_info = get_userdata(2); echo 'Username: ' . $user_info->user_login . "\n"; echo 'User roles: ' . implode(', ', $user_info->roles) . "\n"; echo 'User ID: ' . $user_info->ID . "\n"; ?>
—
Agnieszka Trefler (Ruda) - freelancer, web developer, specjalistka od WordPressa z Wrocławia. Z pasją budowania stron, blogowania i fotografowania. Twórca Inspiracji fotograficznych.