<?php
$author = the_author_email();
?>
I want to store the_author_email into a varible.. so I can call it later in the page inside of some html.. the problem is when I do the above code it echo's the_author_email to the screen! ahhhuughh
<?php
$author = the_author_email();
?>
I want to store the_author_email into a varible.. so I can call it later in the page inside of some html.. the problem is when I do the above code it echo's the_author_email to the screen! ahhhuughh
thats because thats the authors email, not the author.
the_author(); is the author.
so if I wanted to return "the_author" inside of a tag..
<div class="<?php the_author(); ?>"> ?
The way to do it is to use the get_the_author tag.
<?php $author = get_the_author(); ?>
This topic has been closed to new replies.