-
Author
-
April 18, 2015 at 00:38 #55009tyfarris1Participant
i went to add code to the functions.php in the child theme…and it was empty. is this normal..and when i do add code. it doesnt work.
April 18, 2015 at 06:48 #55053LauraModeratorHello, functions.php in child theme has to be empty (only default descripcions) so your custom functions need to be added after the descripcions.
What code are you adding that doesnt work?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 18, 2015 at 06:52 #55055tyfarris1Participantto hide admin from site.
// Remove admin from the member directory
function bpdev_exclude_users($qs=false,$object=false){$excluded_user=’1′; // Id’s to remove, separated by comma
if($object != ‘members’ && $object != ‘friends’)// hide admin to members & friends
return $qs;$args=wp_parse_args($qs);
if(!empty($args[‘user_id’]))
return $qs;if(!empty($args[‘exclude’]))
$args[‘exclude’] = $args[‘exclude’].’,’.$excluded_user;
else
$args[‘exclude’] = $excluded_user;$qs = build_query($args);
return $qs;
}
add_action(‘bp_ajax_querystring’,’bpdev_exclude_users’,20,2);// once admin is removed, we must recount the members !
function bpfr_hide_get_total_filter($count){
return $count-1;
}
add_filter(‘bp_get_total_member_count’,’bpfr_hide_get_total_filter’);April 18, 2015 at 06:54 #55056LauraModeratorHello, maybe its not working because your admin is not ID 1? Please go to Users and edit your admin account, then find the ID in the browser URL, then use the ID in this part of your code
COPY CODE$excluded_user=’1′; // Id’s to remove, separated by comma
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 19, 2015 at 02:00 #55116LauraModeratorHelol, i do not understand what do you mean by default descriptions?
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 🙂
-
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.