BuddyBoss Home – Web Support Forums General BuddyPress (general issues) Buddyboss default avatar buddyboss man is not working in child theme

Viewing 1 post (of 1 total)
  • Question

    #34467
    @kzpower

    I found out the buddyboss man avatar is not working in childtheme. At the beginning, I was trying to change the default avatar, so I copy and paste the below code from parent theme to my child theme, and I change the image path. It gave me the broken image.
    if ( !function_exists(‘buddyboss_addgravatar’) ) {
    function buddyboss_addgravatar( $avatar_defaults ) {
    $myavatar = get_template_directory_uri() . ‘/images/avatar-member.jpg’;
    $avatar_defaults[$myavatar] = ‘BuddyBoss Man’;
    return $avatar_defaults;
    }
    add_filter( ‘avatar_defaults’, ‘buddyboss_addgravatar’ );
    }

    Then, I delete this function in my child theme. I want to test if the buddyboss man avatar work on my child theme or not. It give me the broken image too. What can I do. I have tried different ways. But if the original one on parent theme is not working, then it is useless for me to customize the function. I want to know why it give me broken image, what can i do to solve this problem? If I use the parent theme, the buddyboss man is OK, but if I use child theme, it give me a broken image, I know the image path must wrong, but I try this already, /my_site/wp_content/themes/buddyboss-child/images/my_image.jpg , i try .. at the begining too, I try to delete / at the beginning.

Viewing 1 post (of 1 total)
  • The question ‘Buddyboss default avatar buddyboss man is not working in child theme’ is closed to new replies.