-
Author
-
March 17, 2016 at 18:03 #111304directnet42uParticipant
Hi There,
I had noticed an older post on here with this same question, but I can’t seem to find it. I was wondering how we can update our Activity Stream page to only show updates by default (without the option to filter through new members, comments, friendships, etc). Apparently there is a PHP code that can be added to do this, but at the moment I’m unable to track it down again. I hope someone can help!
Thank you for your time.
March 18, 2016 at 18:04 #111585LauraModeratorHello, try adding this to functions.php of child theme
COPY CODE// Remove (hide) various activities from streams. function my_hidden_activities($a, $activities) { //if admin we want to know //if (is_site_admin()) // return $activities; $nothanks = array(“created_group”, “joined_group”, “new_member”, “friendship_created”, “activity_liked”); foreach ($activities->activities as $key => $activity) { if (in_array($activity->type, $nothanks, true)) { unset($activities->activities[$key]); $activities->activity_count = $activities->activity_count-1; $activities->total_activity_count = $activities->total_activity_count-1; $activities->pag_num = $activities->pag_num -1; } } // Renumber the array keys to account for missing items. $activities_new = array_values( $activities->activities ); $activities->activities = $activities_new; return $activities; } add_action(‘bp_has_activities’, ‘my_hidden_activities’, 10, 2 );
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 18, 2016 at 19:57 #111646directnet42uParticipantUnfortunately that code did not work for us. We’re wanting the activity page to only display updates that people post directly to that page. We do not want it to show new memberships, friendships, cover photos, etc. Hopefully that makes sense, please pass along any questions if you need me to clarify.
March 19, 2016 at 20:04 #111800LauraModeratorHello, try the following
copy this file: “/wp-content/themes/kleo/buddypress/activity/activity-loop.php” to your child theme: “/wp-content/themes/kleo-child/buddypress/activity/activity-loop.php” and you will have to replace the 16’th line with the following:COPY CODE<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&action=activity_update' ) ) : ?>
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 23, 2016 at 20:41 #112440LauraModeratorHello, you could try to filter that by editing the activity loop, i can do that for you if you share ftp credentials 🙂
You want to show all but friendships and new members right? 🙂Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 27, 2016 at 23:09 #112991LauraModeratorHello, fixed, you have the directory name “Buddypress” instead of “buddypress”, simple but important 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 28, 2016 at 18:21 #113134directnet42uParticipantIt looks great, thank you for resolving that issue for us!
March 29, 2016 at 18:09 #113319directnet42uParticipantOops, we just looked at the page again and it looks like it’s still showing new memberships in the latest updates. Do you know why that might be?
March 31, 2016 at 19:26 #113907LauraModeratorHello, check if the code is still there, maybe it shows older entries
Let me know 🙂Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
March 31, 2016 at 19:51 #113910directnet42uParticipantThe code is still there. What seems to happen is that the page will load without those other categories, but then if you stay on the page for a few seconds it shows the “Load Newest” section (see attached image) at the top. Then when you click on that it displays the new members and friendships. Do you know what might be causing this?
Attachments:
You must be logged in to view attached files.April 4, 2016 at 20:22 #114503LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! 🙂Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
April 6, 2016 at 22:51 #114950directnet42uParticipantThank you, we’re hoping someone can assist us with this issue!
April 12, 2016 at 15:46 #115961AndreiModeratorHi,
We’ve provided this code as a starting point some time ago, if the code isn’t working anymore then I’ll have to recommend you to hire a developer in order to implement such custom functionality.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.