WordPress Social Login 2.2.3 plugin works great for me. Now I am trying to show user avatar on his custom post type. I want to show user's social profile avatar in their posts. I tried following code.
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$author_id=$post->post_author;
$args = array( 'post_type' => 'traveller', 'posts_per_page' => 15, 'orderby' => 'rand', 'paged' => $paged );
query_posts( $args);
while (have_posts()) : the_post();
?>
<?php the_title();?><br/>
<img title="<?php the_author_meta('display_name', $author_id); ?>" src="" alt="<?php the_author_meta('display_name', $author_id); ?>" width="150" height="150" />
<?php endwhile; ?>
on the above code, how can I get user's social profile avatar in <img src="">?
<img src="<?php wsl_get_user_custom_avatar( $user_id ); ?>" />
not working.
<img src="<?php echo wsl_get_user_custom_avatar( $user_id ); ?>" />
Also not working.
Plugin is: http://ift.tt/1kMkGaO
Aucun commentaire:
Enregistrer un commentaire