I am developing an author badge for my Wordpress site and I am learning how to call meta functions (needs to be within The Loop). The meta functions that I am calling are author bio related, like username, last name etc
Here is a code example:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> About <?php the_author(); ?>, the author of this blog <?php userphoto_the_author_thumbnail() ?> <?php get_the_author_meta( 'description' ); ?> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?>
I added this example to my author.php file and it worked, however it displayed the same thing multiple times (hence the loop). How do I actually do this if I want to call meta functions in Wordpress and not have them echoed multiple times like this?
I am certain that I am doing this incorrectly and there is a correct way of achieving it.
If you choose to reply, please be detailed as my knowledge of PHP coding is to the extend that I learned what echo is today.