Remove Group Activity from GK Grid

Professional social WordPress theme with metro design, fully-adjustable grid widget and BuddyPress support.
GK User
Tue Oct 14, 2014 6:34 pm
Hello,

I was able to hide the Group activity from the Activity Stream using code found here: https://buddypress.org/support/topic/di ... ty-stream/

However, it still shows on the home page GK grid. www.mutlikeme.com

Is there a way to hide Group Activity from the GK grid as well?

Thanks!

Andrea
User avatar
Senior Boarder

GK User
Tue Oct 14, 2014 11:22 pm
Hi,

Please check this article:
https://codex.buddypress.org/developer/ ... ream-loop/

Probably you can add additional arguments for the activity loop:
object:
groups, friends, profile, status, blogs.
and use e.g. only statuses.

Add your changes in Msocial/gavern/widgets.buddypress.php in this fragment:
Code: Select all
$args = array(
               'max' => 1,
               'per_page' => 1,
               'page' => $offset,
               'action' => 'activity_update'
            );
User avatar
Moderator

GK User
Wed Oct 15, 2014 3:24 am
I added a line to your code above regarding object and status. And it killed the site. So I added only your code above, and it still shows Groups activity posts in the GK Grid on the home page. Please can I have some more direction in this matter? I read the article, but am obviously missing something... Thanks!
User avatar
Senior Boarder

GK User
Wed Oct 15, 2014 7:18 am
Hi,

Try to replace mentioned fragment into:
Code: Select all
$args = array(
               'max' => 1,
               'per_page' => 1,
               'page' => $offset,
               'object' => 'status,blogs'
            );

or try different objects.
User avatar
Moderator

GK User
Wed Oct 15, 2014 6:02 pm
Thank you. I added this to the end of the file in themes/Msocial/gavern/widgets.buddypress.php.

However, I still see group posts in the home page grid. Now, when I click on them, I can't see them. But we wanted them to not be shown at all on the home page.

Thank you for your patience with me with this!
User avatar
Senior Boarder

GK User
Wed Oct 15, 2014 10:12 pm
I'll check this issue exactly when i find some time. In the meantime, please try to ask on buddypress forum how to exclude group(s) from default buddypress activity loop with following arguments:

Code: Select all
$args = array(
               'max' => 1,
               'per_page' => 1,
               'page' => $offset,
               'action' => 'activity_update'
            );
User avatar
Moderator

GK User
Thu Oct 16, 2014 8:25 pm
I'm already able to exclude group posts from both the Activity Stream and individual profile pages. It is just the home page GK Grid that still shows them. Thanks.
User avatar
Senior Boarder


cron