• I’m working on creating an author bio/listing page for when the user clicks on an authors name.

    This will take them them to a page where all the authors posts are listed in the loop and then I’m using:

    $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));

    to pull in the author info before the loop at the top of the page.

    I’m curious what the PHP code is I need to do an if/else statement on this so that if the author has a bio, it would display text that reads “Displaying X number of posts by Author’s Name” plus the bio, if not, it would just display text that reads, “Displaying X number of posts by Author’s Name” without the bio.

    Any help on this would be great. Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to setup if statment for author description using $curauth’ is closed to new replies.