Home › Forums › Support › avatar size in comments This topic has 3 replies, 2 voices, and was last updated 7 years, 2 months ago by Tom. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts November 29, 2015 at 8:57 am #156485 Igor Hello, i would like avatars in comments of 80px width instead of 50px width in my child theme. i dupplicate the comment.php to my child theme i found in the parent theme file : inc/template-tags.php the $args['avatar_size'] = 50; But i don’t know how to change this value without modify the parent theme “template-tags.php”. (I am a beginner ) Thanks November 29, 2015 at 10:36 am #156505 TomLead Developer Lead Developer Hi there, I just added a new filter into the next version which will make this easier. First, find this in the template-tags.php file: $args['avatar_size'] = 50; And replace it with this: $args['avatar_size'] = apply_filters( 'generate_comment_avatar_size', 50 ); Then add this function: add_filter( 'generate_comment_avatar_size','generate_change_avatar_size' ); function generate_change_avatar_size() { return 80; } Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/ Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development November 30, 2015 at 1:43 am #156690 Igor Hello, Thank you, it’s working ! ( I put your “add filter” code into my child theme’s function.php ) So in the next version of GeneratePress,$args['avatar_size'] = apply_filters( 'generate_comment_avatar_size', 50 ); will not be undone ? Thanks ! November 30, 2015 at 10:30 am #156831 TomLead Developer Lead Developer Perfect. That’s correct, the next version will include the filter by default 🙂 Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Ongoing Development: https://generatepress.com/ongoing-development Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In