CMS & WordPress
lukeurtnowski — 2012-06-29T16:34:08-04:00 — #1
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,
Shouldn't this work?
gwinh_dev — 2012-06-30T13:39:01-04:00 — #2
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>
lukeurtnowski — 2012-06-30T13:56:51-04:00 — #3
k, thanks, so the function get_the_author() is outdated but to get the authors name all I need is the_author()
gwinh_dev — 2012-06-30T13:57:33-04:00 — #4
mittineague — 2014-09-22T00:23:12-04:00 — #5
This topic is now archived. It is frozen and cannot be changed in any way.