BuddyBoss Home – Web › Support Forums › Plugins › BuddyBoss Wall › Can I control what shows up on the activity feed
- This topic has 4 replies, 3 contibutors, and was last updated 8 years, 7 months ago by Anonymous.
Question
March 20, 2016 at 10:43 am #64143@thoodJust wondering if i can stop the activity feed to show when a new user becomes a registered member?
i.e. User became a registered member 3 hours,44 minutes agoAnswers
March 21, 2016 at 5:21 am #64229@
AnonymousHi @thood, Please add this function:
try this (add to
child-theme functions.php
orbp-custm.php
) :function swa_remove_new_member_activity( $a, $activities ) { //allow site admin to see if ( is_site_admin() ) return $activities; foreach ( $activities->activities as $key => $activity ) { // activity type name is new_member if ( $activity->type =='new_member') { unset( $activities->activities[$key] ); // recalculate activity items for pagination $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; // output return $activities; } add_action('bp_has_activities','swa_remove_new_member_activity', 10, 2 );
Regards
March 29, 2016 at 2:49 pm #65915@thoodi Inserted the code into function.php after inserting my webpage crashed.
<?php
/**
* @package Boss Child Theme
* The parent theme functions are located at /boss/buddyboss-inc/theme-functions.php
* Add your own functions in this file.
*//**
* Sets up theme defaults
*
* @since Boss Child Theme 1.0.0
*/
function boss_child_theme_setup()
{
/**
* Makes child theme available for translation.
* Translations can be added into the /languages/ directory.
* Read more at: https://www.buddyboss.com/tutorials/language-translations/
*/// Translate text from the PARENT theme.
load_theme_textdomain( ‘boss’, get_stylesheet_directory() . ‘/languages’ );// Translate text from the CHILD theme only.
// Change ‘boss’ instances in all child theme files to ‘boss_child_theme’.
// load_theme_textdomain( ‘boss_child_theme’, get_stylesheet_directory() . ‘/languages’ );}
add_action( ‘after_setup_theme’, ‘boss_child_theme_setup’ );/**
* Enqueues scripts and styles for child theme front-end.
*
* @since Boss Child Theme 1.0.0
*/
function boss_child_theme_scripts_styles()
{
/**
* Scripts and Styles loaded by the parent theme can be unloaded if needed
* using wp_deregister_script or wp_deregister_style.
*
* See the WordPress Codex for more information about those functions:
* http://codex.wordpress.org/Function_Reference/wp_deregister_script
* http://codex.wordpress.org/Function_Reference/wp_deregister_style
**//*
* Styles
*/
wp_enqueue_style( ‘boss-child-custom’, get_stylesheet_directory_uri().’/css/custom.css’ );
}
add_action( ‘wp_enqueue_scripts’, ‘boss_child_theme_scripts_styles’, 9999 );/****************************** CUSTOM FUNCTIONS ******************************/
// Add your own custom functions here
this is where i inserted the code
?>March 29, 2016 at 2:56 pm #65917@thoodi deleted the code by refreshing the previous page and cuting out the code but it didnt work. Can i just go to my server and replace this file with the correct version of function.php
March 29, 2016 at 11:48 pm #65947@
AnonymousHi @thood
Sorry for inconvenience.
Please remove the extra codes you have added inside child theme functions.php and it will be live.Regards
- The question ‘Can I control what shows up on the activity feed’ is closed to new replies.