BuddyPress Hovercards
This plugin adds hovercards (like on WordPress,com (Gravatar), Twitter, Facebook, Google+, etc.) to BuddyPress. Whenever a user hovers over a user avatar, the hovercard shows up. Hovercards are completely themable by adding a hovercard.php template to your (child) theme. Based on imath’s blogpost on
This plugin adds hovercards (like on WordPress,com (Gravatar), Twitter, Facebook, Google+, etc.) to BuddyPress. Whenever a user hovers over a user avatar, the hovercard shows up.
Hovercards are completely themable by adding a hovercard.php template to your (child) theme.
Based on imath’s blogpost on BuddyPress xprofile hovercards and uses the jQuery Tipsy library and Rrrene’s hovercards .
A closer look.
- 01You can download and install BuddyPress hovercards using the built in WordPress plugin installer. If you download BuddyPress Hovercards manually, upload the whole folder to “/wp-content/plugins/”.
- 02Activate the plugin through the ‘Plugins’ menu in WordPress
If you want to add a custom hovercard, or change the displayed fields, copy ‘/bp-hovercards/templates/hovercard.php’ to the root of your (child) theme and edit it there to prevent it being overwritten at an update.
Frequently asked questions.
How can I disable hovercards for certain avatars?
Hovercards are disabled for some avatars already, namely the profile badge and the profile header. To add more disabled elements, you can use the folowing filters:
‘bphc_parent_filter’ to disable hovercards for all children of a certain element id or class, e.g.:
function disable_bphc_by_parent( $filter ) { return $filter . ', .children-of-this-class'; } add_filter('bphc_parent_filter', 'disable_bphc_by_parent');
‘bphc_element_filter’ to disable hovercards for avatar img tag with this class/id, e.g.:
function disable_bphc_for_elements ( $filter ) { return $filter . ', .avatars-with-this-class, #avatar-with-this-id' } add_filter('bphc_parent_filter', 'disable_bphc_by_parent');