Skip to content

Instantly share code, notes, and snippets.

@shahadat014
Created January 18, 2015 19:31
Show Gist options
  • Select an option

  • Save shahadat014/7d47c25aafd316eb0683 to your computer and use it in GitHub Desktop.

Select an option

Save shahadat014/7d47c25aafd316eb0683 to your computer and use it in GitHub Desktop.
To Get Author information
<?php the_author(); ?>
<?php echo get_avatar( get_the_author_email(), 'size here' ); ?>
<?php echo the_author_link(); ?>
<?php the_author_posts_link(); ?>
<?php the_author_meta( $field, $userID ); ?>
<?php the_author_meta('twitter'); ?>
<?php the_author_description(); ?>
<?php echo date("D M Y", strtotime(get_userdata(get_current_user_id( ))->user_registered)); ?>
To add more social fields for author:
function my_new_contactmethods( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = 'Twitter';
//add Facebook
$contactmethods['facebook'] = 'Facebook';
//here can be add more
return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment