Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • @millir

    Participant

    I am clueless how to use this 🙁

    @millir

    Participant

    YAY! it worked…. thanks a lot @r-a-y

    For anyone else looking for the code, here it is:

    /*activity stream*/
    if (!function_exists('wwn_bp_activities')) {
        function wwn_bp_activities( ) {
    		ob_start();
    		if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . 'per_page=5' ) ) :
    			while ( bp_activities() ) : bp_the_activity();
    				$output .= locate_template( array( 'activity/entry.php' ), true, false );
    			endwhile;
    		endif;
    		$output = ob_get_contents();
    		ob_end_clean();
    		
    		return $output;
    	}
    	add_shortcode('wwn_bp_activities', 'wwn_bp_activities');
    }

    @millir

    Participant

    hey @danbp

    I tried your code. It’s displaying the entire page of activity that we see default in /activity/. By entire page, I mean the entire PAGE-TEMPLATE is being reproduced in my homepage template. It’s like an embed. It’s pushing all content, i.e. the widgets and footer below it.

    Here’s a rough display of what I am getting:

    SITE ACTIVITY
    Hello, POST UPDATE box
    Activity 1
    Activity 2
    etc..

    <br />
    Footer
    <br />
    widget1
    widget2
    widget3

    @millir

    Participant

    bump… Need help please

    @millir

    Participant
    function wwn_bp_activities( ) {
    		ob_start();
    		if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . 'per_page=5' ) ) :
    			echo "<ul id=\"activity-stream\" class=\"activity-list item-list\">";
    			while ( bp_activities() ) : bp_the_activity();
    				locate_template( array( 'activity/entry.php' ), true, false );
    			endwhile;
    			echo "</ul>";
    		endif;
    		ob_end_clean();
    	}

    I tried it but everything in locate_template( array( ‘activity/entry.php’ ), true, false ); doesnt display. No site activity is displayed. I only get the

      fields as output
Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar