BuddyDev

Search

[Resolved] Buddyblog query following

Tagged: ,

  • Participant
    Level: Initiated
    Posts: 20
    clyn on #15070

    Hi,

    I dont know is this possible but this is also suggest. I like your buddyblog plugin. There 2 subnav “posts” and “new post(edit)” … my question is;

    1 – Can i display (call) member’s following people posts under new 3rd subtab. I can call [activity-stream] shortcode but i like your post template under BLOG … When member B visit, Member A “BLOG” tab , also will display Member A Following people publish post?

    Thanks…

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #15071

    Hello Clyn,

    Thank for posting. Try this and let me know if it works or not. Please refer the following url:

    https://gist.github.com/raviousprime/b35211c906904d1d3e3dfe4bc9a0318a

    Thank You
    Ravi

  • Participant
    Level: Initiated
    Posts: 20
    clyn on #15073

    Hello Ravi,

    Thanks your reply. Subnav “Following User” is showing but posts are not shown under this tab. line46 $follwing_user_ids = bp_follow_get_following and line 52 $query->set( ‘author__in’, $follwing_user_ids );

    $follwing = $following i also tested like this but posts not show…

    Regards,

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #15074

    Hello Clyn,

    Thank you for the acknowledgement. Try printing “$follwing_user_ids” this variable and check weather this variable have empty value or array of user ids that he is following and let me know.

    Thanks
    Ravi

  • Participant
    Level: Initiated
    Posts: 20
    clyn on #15075

    Hi,

    Yes you are right so sorry its only my copy paste problem from github. Yes its working now. Million Thanks.
    At the moment this code is really good for other buddyblog plugin users. I’m asking for more develop; you know with your other pluging [activity-stream rol=editor] we can get different posts or other activity per role to any page. So, https://gist.github.com/raviousprime/b35211c906904d1d3e3dfe4bc9a0318a , how can we extend query per role that code?

    Million Thanks

  • Participant
    Level: Initiated
    Posts: 20
    clyn on #15076

    per role and also global site wide posts

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #15087

    Hello Clyn,

    Thank you for the acknowledgement. For that first you have to find all the user ids for that specific role and then simple pass those ids to “author__in” clause of the query. Hope it will help.

    Thank you
    Ravi

  • Participant
    Level: Initiated
    Posts: 20
    clyn on #15335

    Ok its solved million thanks….

The topic ‘ [Resolved] Buddyblog query following’ is closed to new replies.

This topic is: resolved