Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • shavonn4prez
    Participant

    @shavonn4prez

    @modemlooper I know! I tried the code you gave me but I couldn’t get it working. Time constraints involved.


    shavonn4prez
    Participant

    @shavonn4prez

    btw- that’s Buddypress Follows that I get the following IDs from.


    shavonn4prez
    Participant

    @shavonn4prez

    This is what I ended up doing for now if anyone cares 🙂

    <?php
    if (is_user_logged_in() && is_home()) {
      $user_id = get_current_user_id();
      $user=wp_get_current_user();
      $name=$user->display_name;
      $following_ids = bp_get_following_ids( array( 'user_id' => $user_id ) );
      $follows = implode( ',', (array) $following_ids );
      	$args = array (
          'max' => 5,
          'filter' => array(
            'user_id' => $follows,
            'action' => 'new_tutorial'
          )
      	);
    	$pre_rec = bp_activity_get($args);
    	$activities = $pre_rec['activities']; ?>
    <div class="container-fluid follow-updates">
      <div class="row">
        <div class="col-md-12">
          <h2 class="sub-title"><?php echo $name ?> follows...</h2>
    <div class="container">
      <div class="row activity-row">
            <?php if($activities){
    
              foreach ($activities as $activity) {
                $postID = strip_tags($activity->secondary_item_id);
                $post = get_post($postID);
    
                include(TEMPLATEPATH."/partials/tutorial-block.php");
    
            			// 'ID'		=> strip_tags($activity->id),
            			// 'TYPE'		=> strip_tags($activity->type),
            			// 'TIME' 		=> strip_tags($activity->date_recorded),
            			// 'AUTHOR' 	=> strip_tags($activity->display_name),
            			// 'TITLE' 	=> strip_tags($activity->action),
            			// 'CONTENT' 	=> strip_tags($activity->content),
            			// 'ITEM_ID'	=> strip_tags($activity->item_id),
            			// 'REL_ID'	=> strip_tags($activity->secondary_item_id),
                }
    
             } else { ?>
               <p class="text-center"><?php _e('There are no recent posts of those you follow. Find new friends!'); ?></p>
             <?php } ?>
    
      </div>
    </div>
    
        </div>
      </div>
    </div>

    shavonn4prez
    Participant

    @shavonn4prez

    I put this in bp-custom. Is this correct? I also changed the post_type to mine which is tutorial but it doesn’t seem to be affecting the stream I have on the homepage.

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar