Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Show avatar at question list

+5 votes
524 views
asked Mar 5, 2015 in Themes by Вук Станковић
edited Mar 5, 2015 by Вук Станковић
I'm trying to show avatar at question list page and when i var_dump post, there is no avatar index in an array, but when I go to single question view, everything is fine.

What am I doing wrong.

Also avatar() method works on single question page, but returns null on list page
Q2A version: 1.7
commented Mar 5, 2015 by pupi1985
The title of your question states you want to show it in the question LIST. The content of your question states you want to show it in the question PAGE. Which one is it? A screenshot is always easier to understand
commented Mar 5, 2015 by Вук Станковић
fixed it. Sorry about that. Anyway, it said later that there is no problem with single question layout

1 Answer

+4 votes
answered Mar 5, 2015 by pupi1985
selected Mar 5, 2015 by Вук Станковић
 
Best answer

So you want to display the avatar in question lists as it is in this site, right? If that is the case, then there is no need to code anything.

Navigate to admin/users and locate the Avatar size on question lists setting. Make sure it is set to 20 or whatever positive number makes sense to you. Obviously, make sure you allow your users to use avatars or gravatars :)

...