Skip to:
Content
Pages
Categories
Search
Top
Bottom

How To: Change your mystery man image

  • Profile photo of Mike Pratt
    Mike Pratt
    Participant

    @mikepratt

    may have asked how to change the image BP uses for the ‘mystery man’ choice in BP General Settings. It’s simple and copying your own image into the bp-core/images folder is not the answer! Just do this ->

    In your theme’s functions.php add -> (assumes you have a child theme called ‘my-theme’

    function my_new_mysteryman () {
    return site_url('/wp-content/themes/my-theme/_inc
    /images/my-new-mystery-man.jpg' );
    }
    add_filter( 'bp_core_mysteryman_src' , 'my_new_mysteryman', 1, 7 );

    Note: You will not see your awesome new mystery man image show up in the BP admin area but it will populate throughout your site.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Profile photo of Windhamdavid
    Windhamdavid
    Participant

    @windhamdavid

    very nice tip!

    Excellent, had been wondering how to do this, many thanks.

    Profile photo of Mike Pratt
    Mike Pratt
    Participant

    @mikepratt

    update to make it more generic (change your theme image path as nec):

    function my_new_mysteryman () {
    return get_stylesheet_directory_uri() . '/_inc
    /images/my-new-mystery-man.jpg' ;
    }
    add_filter( 'bp_core_mysteryman_src' , 'my_new_mysteryman', 1, 7 );

    Hi,
    I see it has been a long time since this post was made, but I was wondering if this code is still working since the 1.5 upgrade. I have been using this wonderful function for many months and it has been working perfectly; yet ever since upgrading to 1.5, it no longer works for me (when placed inside my custom theme’s functions.php file).
    Any ideas? Is anyone else having this problem? I’m now once again stuck with that annoying default mystery man : ) Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How To: Change your mystery man image’ is closed to new replies.
Skip to toolbar