Author not displaying in post info for single custom post type (1 post)

  1. Marj Wyatt
    Posted 3 years ago #

    The author shows up in archives displaying the custom post type but does not show up on the single display of that custom post type.

    Here is a link to my custom post type declaration: http://pastebin.com/hNuGmcqK
    Here is a link to my single-customtype.php: http://pastebin.com/Cpa2zwrt

    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>'; ?>

    Here is a link to a single post type rendered by the above code at the development environment:

    I'm truly baffled and I'm hoping that some smart person here can point me at the missing piece of the puzzle that my brain just can't seem to find.

Topic Closed

This topic has been closed to new replies.

About this Topic