Reputation: 87
Need help with the if statement below. I keep getting a echo/print of my variable.
<?php if (the_author_meta('display_name') == 'johnwayne') { ?>
<div>Blank</div>
<?php } ?>
When i place this code, it will print/echo "johnwayne" instead of the div..
So basically if johnwayne is the author, i want to show a blank div. If anyone else is the author, show a regular div.
Upvotes: 0
Views: 353
Reputation: 956
the_author_meta displays the info, you want get_the_author_meta
Upvotes: 2