WordPress.org

Support

Support » Plugins and Hacks » get author name hack

get author name hack

  • I found this out while messing around with my template. It only works when your using mod_rewrite:

    <?php if (is_author()) { ?>
    <h2><?php $expl = explode("/",$_SERVER["REQUEST_URI"]);
    $author = $expl[count($expl)-1];
    echo $author."'s Posts"; ?></h2>
    <?php } ?>

    Slightly ineffective, but it works if you have author/name and it will grab name.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘get author name hack’ is closed to new replies.