WordPress.org

Ready to get started?Download WordPress

Forums

Author page with no posts - show author name (1 post)

  1. shadez
    Member
    Posted 1 year ago #

    like the title states, i wish to display the 'name' of the author even there are no posts by him/her.
    but 'get_the_author()' doesnt return the string and i cant figure out any other method.

    the code here doesnt work for me as suggested by WP:
    http://wordpress.org/support/topic/author-page-with-no-posts?replies=6#post-798266

    my author.php file is quite simple and contains this:

    <?php if ( have_posts() ) the_post(); ?>
    <div id="content" role="main">
        <h1 class="page-title">
        <?php get_the_author(); ?>
        </h1>
        <?php rewind_posts();
        get_template_part( 'loop', 'author' ); ?>
    </div>

    would appreciate any help here...

Topic Closed

This topic has been closed to new replies.

About this Topic