Skip to:
Content
Pages
Categories
Search
Top
Bottom

Moving the group header and image

  • @ceballosb

    Participant

    Hello,

    I’ve recently been asked to use BuddyPress to make a forum style website, so I’m sorry for how nooby this is going to be, and I’m using one of my own themes as a base for it. As part of my own theme I have a large landing image and already have author icons setup for the pages.

    I would like to move the group header image and author image onto my theme’s areas. What would I have to do to strip do_action( ‘bp_before_group_header’ ); apart to get just the image, and the ‘author’ style profile icon out of that action?

    WordPress Version: 4.9.2
    BuddyPress Version: 2.9.3

    Thanks in advance

Viewing 1 replies (of 1 total)
  • @dcavins

    Keymaster

    Hi I’m not exactly sure what you mean, but if you’re looking to get the profile image associated with a group or user, you can use the avatar-fetching function that BP uses in its templates, bp_core_fetch_avatar():
    https://buddypress.trac.wordpress.org/browser/tags/2.9.3/src/bp-core/bp-core-avatars.php#L99

    As an example, you might use

    bp_core_fetch_avatar( array(
    			'item_id' => $user_id,
    			'type'    => 'thumb',
    			'width'   => false,
    			'height'  => false,
    			'html'    => true,
    			'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), 'user name' )
    ) );
    
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar