WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] the_author_meta not working (3 posts)

  1. bestfoot
    Member
    Posted 4 years ago #

    Trying to insert an authors image ... not working. Code:
    <img src="<?php echo get_option('home'); ?>/wp-content/images/authors/<?php the_author_meta('first_name'); ?>_<?php the_author_meta('last_name'); ?>.jpg" class="ImagesLeftAlign" alt="<?php the_author(); ?>">

    the_author is working ... returns the author's name
    the_author_meta('first_name') returns nothing ... it's blank.

    I have tried get_the_author_meta as well.

    I have tried user_firstname and user_lastname also with both combinations.

    Suggestions?

  2. bestfoot
    Member
    Posted 4 years ago #

    wondering if I need to have data in author_meta table or something that isn't in there?

  3. bestfoot
    Member
    Posted 4 years ago #

    Yes that is the issue ... first/last name field was blank for the author I was testing this on. Marked as resolved, left it up in case it might be helpful to others.

Topic Closed

This topic has been closed to new replies.

About this Topic