WordPress.org

Ready to get started?Download WordPress

Forums

Adding the_author_firstname() to archive.php (3 posts)

  1. Steve_WP
    Member
    Posted 9 years ago #

    Hi All.

    New user and well please with the product and the support here :)

    I added the following Template tag to archive.php

    <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    <h2 class="pagetitle">Author Archive -

    <?php the_author_firstname(); ?>

    </h2>

    but it is not showing up when I browse from a link generated by

    <?php the_author_posts_link('namefl'); ?>

    Any ideas?

    Thanks

    Steve

  2. Kafkaesqui

    Posted 9 years ago #

    If used outside The Loop, the_author_firstname() will not function as expected, as it works in conjunction with post data.

    To do what you're after, see my posts in this thread:

    http://wordpress.org/support/topic.php?id=27554

  3. Steve_WP
    Member
    Posted 9 years ago #

    Excellent.

    Thank You Kafkaesqui

    Steve

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags