Support Forum

Avatar size ¿Can i change?

CA Carlos
Carlos
Member

Hello, would like to edit the size of the avatar … how can i do it?  i mean the avatar that is on every post a user does

 

and the avatar of the top is possible too?

 

I tried to search on the codex but it says that my “suscription has expired” hope someone can check it because i have just renewed

 

thanks in advance

3 Answers

New Answer

MP Mr Papa
Mr Papa
Member

yes, all the avatar display functions take a size argument so you can make them whatever size you want…

see:  http://codex.simple-press.com/codex/api/template-functions-and-the-api/display-template-functions/common-view/sp_useravatar/

just look in your sp theme in the appropriate template file, spTopicVew.php for example on topic view or spHead.php for the one by welcome message, for that template function and change up the size…

also, be sure you edit your own theme and not one of ours:  http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

CA Carlos
Carlos
Member

Hi, i tried several times with no luck, this is the code i tried

 

sp_UserAvatar(‘tagClass=spPostUserAvatar size=200 spCenter&context=user’, $spThisPostUser);

 

whats wrong?

 

 

YS Yellow Swordfish
Yellow Swordfish
Member

Firstly you placed this in the middle of the class argument (‘spPostUserAvatar spCenter’) but also arguments in this type of WordPress template function require each argument to be delimited by an ampersand. So you will need to have it like this:

sp_UserAvatar('tagClass=spPostUserAvatar spCenter&context=user&size=200', $spThisPostUser);

which should do it for you.