Display author name

I have this code in my author.php file


<h1 class="entry-title author">All posts by <?php get_the_author(); ?></h1>

But it doesn’t appear to work,
http://fixmysite.us/gmpc/?author=1

Shouldn’t this work?

that function is already deprecated, try checking the WordPress Codex to verify.
Here’s a quick fix:

<h1 class=“entry-title author”>All posts by <?php echo get_the_author(); ?></h1>

but we’re using the deprecated function here, so, here’s an alternative solution:

<h1 class=“entry-title author”>All posts by <?php the_author(); ?></h1>

k, thanks, so the function get_the_author() is outdated but to get the authors name all I need is the_author()

yup! try it out man