Support » Fixing WordPress » the_author_meta not working

  • Resolved bestfoot


    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.


Viewing 2 replies - 1 through 2 (of 2 total)
  • bestfoot


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



    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘the_author_meta not working’ is closed to new replies.