Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to limit activty loop to friends only sitewide with the exception of the admin?

I am trying to pass 2 parameters to the user on the if/else statement as the below code shows. The main issue is the else. It loads only 5 items per page as it should, but the &scope=friends is not filtering the activity to show only friends activity for non-admins. Please tell me what I am doing wrong here! Thank you.
`<?php
$params = ”;
if ( ! is_admin() )
$params .= ‘&per_page=5’;
else
$params .= ‘&scope=friends&per_page=5’;

?>

`

Skip to toolbar