Andy T
Andy T

Reputation: 41

Wordpress returning double values for get_author

I took over a Wordpress site and noticed a weird bug. Despite echoing a single get_author() on posts, the pages are displaying doubles for the author (i.e., AuthorAuthor).

Any idea why this may happen?

Upvotes: 0

Views: 137

Answers (1)

Kwebble
Kwebble

Reputation: 2075

The function may display the content already so echoing it will produce the name twice. Remove the echo, or use get_the_author().

Upvotes: 1

Related Questions