BuddyDev

Search

[Resolved] Buddydev Activity Shortcode For User Roles?

  • Participant
    Level: Initiated
    Posts: 9
    Brayden on #1954

    Hello Brajesh,

    I am using your activity shortcode plugin and I have a question. Is there any way to show activity updates from a certain user role and from groups as well?

    I am currently using this shortcode, but for some reason it is only showing group posts, the id=1 is not working. Perhaps I have the syntax wrong.

    [activity-stream object=groups user_id=1]

    If possible is there a way to do this with a role instead? Something like:

    [activity-stream object=groups user_role=subscriber]

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #1957

    Hi Bryden,
    I am sorry but the answer will be no. BuddyPress default activity does not allow filtering activity based on roles, and this plugin acts as a wrapper for the default activity.

    It is doable by fetching the user_ids for the selected role and passing in the user_id parameter but that is beyond the scope of the activity shortcode plugin.

    About your usage of shortcode:- object=”groups” is used for group component.

  • Participant
    Level: Initiated
    Posts: 9
    Brayden on #1970

    Thank you for the quick response, would I be able to do something like this?:

    [activity-stream object=groups user_id=1,2,3,4,5]

    How would I make the activity stream to show group updates and updates from users 1,2,3,4,5?

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #1971

    Hi Brayden,
    Please try this

    
    
    [activity-stream  user_id="1,2,3,4,5"]
    
    

    Does that work for you?

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #1978

    Thank you for marking it as resolved. Closing the topic now.

The topic ‘ [Resolved] Buddydev Activity Shortcode For User Roles?’ is closed to new replies.

This topic is: resolved