We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How do I show the avatar of the post author, not the current user?

How Do I?

mhallaba's avatar
mhallaba
32 posts
9 years ago
mhallaba's avatar mhallaba

Hi,

Trying to display the avatar for the user that created the post instead of the current user. Some help?

For reference here’s my code;

<div id=”posts_box”> {exp:channel:entries channel="video"} <!–sub box that centers them–> <div id=”post”>

<div id=”video_title”> {video_title} </div>

<div id=”video”> <iframe title=”YouTube video player” class=”youtube-player” type=”text/html” width=”640” height=”390” src=”{video_url}” frameborder=”0” allowFullScreen></iframe> </div>

<div id=”video_description”> {exp:member:custom_profile_data}{avatar_url} {/exp:member:custom_profile_data}{screen_name}

Playing {game_title}

Published {entry_date format="%F %j, %Y"} </div>

</div>

{/exp:channel:entries}

       
Ingo Wedler's avatar
Ingo Wedler
63 posts
9 years ago
Ingo Wedler's avatar Ingo Wedler

According to this: https://docs.expressionengine.com/latest/channel/channel_entries.html#avatar-url

It should be:

{if avatar}
        {avatar_url}
{/if}

Placed inside the channels entry tag.

Hope this helps, Ingo

       
mhallaba's avatar
mhallaba
32 posts
9 years ago
mhallaba's avatar mhallaba

Thanks!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.