Skip to content

Instantly share code, notes, and snippets.

@studiograsshopper
Created October 9, 2011 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save studiograsshopper/1273878 to your computer and use it in GitHub Desktop.
Save studiograsshopper/1273878 to your computer and use it in GitHub Desktop.
WP Show author details on author archive
<?php
/**
* Function to display author details on the author archive page
*
* @uses get_query_var()
*
* @return echo out the author's details
* @author Ade Walker http://www.studiograsshopper.ch
*/
function sgr_author_info() {
if( !is_author() ) return;
if( get_query_var('author') ) {
global $wp_query;
$curauth = $wp_query->get_queried_object();
}
$bio = $curauth->description;
$name = $curauth->display_name;
$website = $curauth->user_url;
echo '<p>All posts by : ' . $name . '</p>';
echo '<p>About ' . $name . ' ' . $bio . '</p>';
echo '<p>Website: <a href="' . $website . '">' . $website . '</p>';
}
add_action('genesis_before_loop', 'sgr_author_info', 20);
@studiograsshopper
Copy link
Author

Agency / ade_guitars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment