The following code needs to placed in the functions.php
file of any theme that has a replacement mystery man avatar. Adding it to bp-custom.php
will not work in this instance.
<?php
// Use a differnt image than default mystery man
function bp_custom_set_avatar_constants() {
define( 'BP_AVATAR_DEFAULT', get_stylesheet_directory_uri() . '/images/mystery-man.jpg' );
define( 'BP_AVATAR_DEFAULT_THUMB', get_stylesheet_directory_uri() . '/images/mystery-man-50.jpg' );
}
add_action( 'bp_init', 'bp_custom_set_avatar_constants', 2 );
?>
You then need to create an images
folder in your theme containing two jpg images of your replacement images, matching the names you define in the code above. The one for BP_AVATAR_DEFAULT_THUMB should be 50px x 50px. The other should be 150px x 150px.
Related Posts:
- How to set permalink structure via functions.php
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- date_i18n() issue
- How to override BuddyPress 3.0 bp-nouveau theme files?
- WordPress Multisite: Have the same header and footer of main-blog on all sub-blogs
- Display site admin profile fields in header.php
- How to test for MU via functions.php?
- Same footer on all multisites blogs
- Excluding a page with a certain name from wp_page_menu
- How can I disable/hide certain themes in multisite?
- How to display posts in hyperlink with nested slugs?
- Change the template of multiple multisite pages at the same time
- Is it a bad practice to use switch_to_blog in the frontend?
- Theme Development for WordPress Multisite Installation
- WordPress empty Nav Menu error
- multisite: global menu containing network site links?
- buddypress: how do i make the group description excerpt shorter?
- Adding custom class to get_avatar() image doesn&https://wordpress.stackexchange.com/https://wordpress.stackexchange.com/#39;t work
- Acivate all themes multisite wide automatically
- Question regarding WP multisite feature
- Featured Image meta box not showing up
- Change the “Default Avatar” admin option via functions.php
- Where do files uploaded via Media Manager get stored in MU?
- Overrride buddypress theme function [closed]
- How to allow users to create their own website within my domain? [closed]
- Different text on different sites in a multisite setup
- How to make a theme unable to be used on a multisite network?
- Sample Theme Options page for Multisite – what to consider
- Get themes’s images path in WordPress Multisite
- Multi Site Setup, Child Themes, Getting Style Sheet Directory
- Converting a theme to a child theme in a network
- HTTP Error when uploading images over specific dimensions
- How to get blog-id of an MU site from functions.php
- get_avatar() is not working in my custom theme
- Array for WordPress Avatar Size and Class
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- How to get full native language instead of iso?
- How to make menus, footer, sidebars multi language
- Why does the theme of secondary site load the primary one in WordPress Multisite? [closed]
- Let user publish posts on community page
- How to hide blog by id wordpress multisite listing
- Can I use WP Multi-site on a sub-domain with a different theme but use all the original site’s posts/pages?
- Mutlisite in wordpress is not working
- background_image support multiple image size?
- wp_update_comment not working
- How can I demonstrate themes well?
- Theme Options Doesn’t Work On WP Multisite
- Custom link color or stylesheets
- Not Found when using activity stream as front page with BuddyPress
- How To Add New Option Types To Option Tree?
- What methods should be used to fend off splogs in a multiuser install? [closed]
- Trigger Customizer saving process with Javascript only
- Comment form not display properly?
- How to add menu support to a theme?
- Moving functionality from functions.php to classes?
- Extend walker – navigation, adding data attribute to a tag
- Gutenberg Reusable Block as part of WordPress Theme page
- Does WordPress count as a means to learn web development? [closed]
- current-menu-item class not working
- Prevent theme from activating [duplicate]
- Messing up with transient API – getting flushed on refresh
- Correctly using wp_head()
- Cannot figure out how to overwrite files in child theme
- Inheritance of parent theme plugin files in a child theme
- Implementing FancyBox
- Single Page Design, Storing in Theme Options
- How to append to menu items selectively
- Working with a WP Starter theme
- Should I change text-domain of TGM library inside theme?
- tag is being auto inserted
- “Bad element for masonry: undefined” why this error us occuring? [closed]
- Scroll to position on page for category pages only — woocommerce
- Displaying details of a post in a sidebar
- Multi-page posts: A subdirectory for each post?
- How do I get the trackback count of a post in wordpress without writing an SQL query?
- Call to require(‘../../../wp-blog-header.php’) results in 404 error?
- How to add menù section to my WordPress template?
- How to add post meta fields to an article’s as meta elements
- Callback Function Not Firing On Selection In Media Uploader
- How add built-in textarea in theme development?
- Pagination fuction in shortcode always displays on top
- tag__in does not return posts
- Add content after get_header
- How to remove bullets from widget
- wanted to sort the wp_query array by two ACF field (Year and month)
- Created blank theme for REST API, featured image not appearing on admin side
- Custom php template file only for mobile
- which template should I use for single category post?
- Testing localhost WordPress site over LAN with iPad, iPhone
- Fallback dosen’t work when not using ‘menu’ attribute
- Reliable method to detect mobiles
- Using require_once for parent-directory not working but is working in sub-directories
- WordPress get number of categories
- Add social media icon in header area
- Using wp_enqueue_script with social media buttons?
- Want to include ad code after related post
- How can disable function wp_link_dialog()
- Pagination adds product to cart Woo-Commerce
- Onepage with shortcodes
- Theme’s featured image option is not showing up