Support » Fixing WordPress » Cannot make the_author template tag work properly

  • I am attempting to design my first WordPress theme. I am an experienced website designer with a good knowledge of HTML and CSS. I am not a developer and have only a rudimentary knowledge of PHP.

    I want to set up a template page that will display the author’s name on the post as a byline. In order to do this, of course, I need the author’s first and last name to be displayed, not the author’s nickname or login name.

    Here’s the code at the beginning of the template page I’ve been working on

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Everything I’ve tried with this will display only the nickname, not the author’s full name.

    Any suggestions on what I’m doing wrong?



Viewing 1 replies (of 1 total)
  • OK, so I was able to get it to work by changing

    <p class="byline01"><?php the_author('namefl') ?></p>


    <p class="byline01"><?php the_author_meta('first_name') ?> <?php the_author_meta('last_name') ?></p>

    That seems a bit clumsy and awkward to me. Is there a better way of doing it?


Viewing 1 replies (of 1 total)
  • The topic ‘Cannot make the_author template tag work properly’ is closed to new replies.