Tagged: friends, mpp-list-media, status
I’m using the following shortcode:
[mpp-list-media type="photo" component="members" status="friends" orderby=date per_page=12 pagination=1]
As per the docs. https://buddydev.com/mediapress/topics/getting-started/shortcodes/mpp-list-media/ status=”friends” should return only photos from MY friends. I think? However, I seem to get returned a page (query result) of photos from almost all site members.
Or have I misunderstood the shortcode?
R.
Ok, thanks Ravi, this now returns media with the SETTING of visibility=friendsonly. This has nothing whatsoever to do with MY friends.
Even though it’s weird, at least it’s understandable, (closing).
- This reply was modified 6 years, 11 months ago by Richard Foley.
Hello Richard,
Thank you for the acknowledgement. Please download the latest code of MediaPress from the following url
https://github.com/buddydev/mediapress
and use the following code if you want to list media of loggeded-in user friends
function buddydev_list_friends_media( $args ) { if ( empty( $args['include_users'] ) && is_user_logged_in() ) { $args['include_users'] = bp_get_friend_ids( bp_loggedin_user_id() ); } return $args; } add_filter( 'mpp_shortcode_list_media_defaults', 'buddydev_list_friends_media' );
Thank You
Ravi- This reply was modified 6 years, 11 months ago by Ravi.
hi Ravi,
that’s working fine, thanks very much for the quick fix!
Cheers
R.
The topic ‘ [Resolved] mpp-list-media status=friends returns everything’ is closed to new replies.