Skip to:
Content
Pages
Categories
Search
Top
Bottom

Display media count on profile


  • arnotzon
    Participant

    @arnotzon

    Hi,

    I’m trying to display media count on the profile header. I’ve tried this:

    function show_media_count() {
    
    	$title =  rtm_get_album_media_count( $album_id);
    	
    	if ( $title != '' ) {
    		$str = $title . '<br>' ;
    		echo ' <b>Media:</b> ' . $str;	
    	}
    
    }
    add_action( 'bp_profile_header_meta', 'show_media_count' );

    This works, but only when you are on the member’s media tab. Is there a way to display it all the time? Also, would it be possible to display photos and videos count separately? (I’m using rtMedia)

  • You must be logged in to reply to this topic.
Skip to toolbar