At the bottom of that script, you’ll notice two echo statements. The first one is displaying the author, and that’s great. Here’s that line of code: <?php echo '<p>This post was contributed by ' . get_the_author_meta('display_name') . '</p>'; ?>
In the second echo, I am trying to use a variable to echo the same data, using the same function that is working in the above statement and nothing displays.
second echo’s variable: $another_artist = get_the_author_meta('display_name');
second echo’s output code: <?php echo '<p>This post was contributed by ' . $another_artist . '</p>'; ?>