This topic has 5 replies, 2 voices, and was last updated 10 years by Laura.

  • Author
  • #55009
     tyfarris1
    Participant

    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.

    #55053
     Laura
    Moderator

    Hello, 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 solution
    #55055
     tyfarris1
    Participant

    to 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’);

    #55056
     Laura
    Moderator

    Hello, 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 solution
    #55110
     tyfarris1
    Participant

    i dont even see default descriptions.

    #55116
     Laura
    Moderator

    Helol, 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 solution
Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?