Last active
January 11, 2017 19:40
-
-
Save kaweski/f7fe20bae70bf8188d630c98e9b0b07e to your computer and use it in GitHub Desktop.
Informações do autor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$author_image = get_user_meta( $author_id, 'qd_user_image', true ); | |
// Pega a imagem inserida para o custom field | |
if ( $author_image ) { | |
echo '<img src="'. $author_image .'" />'; | |
// Pega a imagem do Gravatar | |
} else { | |
echo get_avatar( $author_id, 128 ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_user_meta( $author_id )['description'][0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$author_id = get_the_author_meta('ID'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="<?php echo get_author_posts_url( $author_id, get_the_author_meta( 'user_nicename' ) ); ?>"> | |
<?php the_author(); ?> | |
</a> | |
/* OU */ | |
<?php the_author_posts_link(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment