• All I’m trying to do is get the code in the SIDEBAR to display some text describing the INDIVIDUAL author of each post. How do I do this?

    <?php  $author = get_the_author();
    if ($author='John Smith')
      echo "John Smith was the author of this post";
    elseif ($author='Jane Doe')
      echo "Jane Doe was the author of this post";
    else
      echo "Welcome to our site!";
    ?>

    How can I write that code to get it to work inside the sidebar or header?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘$author variable in sidebar? How do I change text per author of post?’ is closed to new replies.