Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to display the FollowingUser’s activity


  • mutoha
    Participant

    @mutoha

    Hi,

    I installed “BuddyPress Follow”, but the FollowingUser’s activity is not displayed on this page→(http://example.com/members/smith/activity/following).

    So I tried to write the code for that, but it does not work well.

    <div id="FollowingUsersActivities">
    
      <?php global $userdata;
      $user_id = $userdata->ID;
      $follow_user = bp_get_following_ids( "user_id=$user_id" );
        $args = array(
          'posts_per_page' => $wp_query->max_num_pages,
          'paged' => $paged,
          'author' => $follow_user
        );
        query_posts($args); ?>
    			
      <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
        <?php while ( bp_activities($args) ) : bp_the_activity($args); ?>
    
          <?php bp_get_template_part( 'activity/entry' ); ?>
    
        <?php endwhile; ?>
      <?php endif; ?>	
    		
    </div>	

    What’s wrong with the following code?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar