Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

  • MilliR
    Participant

    @millir

    I am clueless how to use this 🙁


    MilliR
    Participant

    @millir

    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

    @millir

    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

    @millir

    bump… Need help please


    MilliR
    Participant

    @millir

    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