Forums

How to add Author name in Header.php (1 post)

  1. geraldholubowicz
    Member
    Posted 2 years ago #

    Ok, it's maybe a very simple thing to do, and I'm sorry for lack of skills, but I'd appreciate some help here.
    I'd like insert the author name and firstname in the header instead of the blog name. I tried to use the <?php the_author('lastname'); ?> tag, but it's not working (probably because it should be used in the loop).
    Here is a piece of my code in the header.php file

    <body>

    <?php if(function_exists('wp_admin_bar')) wp_admin_bar(); ?>

    <div class="header_header">
    <h1 id="name">/" <?php the_author('lastname'); ?></h1>
    <h1 id="surname">/" <?php the_author('firstname'); ?></h1>

    Ok please, heeeeeelp me!
    Many Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by geraldholubowicz
  • This topic is not resolved
  • WordPress version: 2.9