jatt05
Forum Replies Created
-
Hi Michael,
Hope you are well, The code you created stopped working for some reason. Can you please look at it again?
Thanks
it worked perfectly as I wanted. Thank you again ??
Have a wonderful weekend ahead.Thank you for your reply,
I appreciate your time and efforts. yes, it is for /members/ here are few users who are not approved. (entire right column)
https://privatebin.net/?81076161118ca0ae#2oXxRrPEcedmGAGVn8Nfe3qfaS9FTn2ozR4k2Ay6ATEy
to test I tried to added code in functions.php didnt worked, got the following error. am I adding in the wrong place?
https://privatebin.net/?f061f05ae64e49d7#DeqkyyrPfNs7CADHv1mwfzjoqpxNiZ9mR7F5Sgms7cMBPer your conclusion, we definitely need it, kindly prepare a custom code for me.
Appreciate it. Thank you.Hello Micheal,
Thank you for the prompt reply, Yes I use Buddypress, I am not a developer so could not understand the code. to achieve the goal I created a new role, make it a default role, and found this code to exclude a specific role from the members loop.
function exclude_roles_from_members_loop( $retval ) { if ( bp_is_members_directory() ) { $exclude_ids = get_users( array( 'fields' => 'ID', 'role__in' => array( 'Admin' ) // change the roles here ) ); $retval['exclude'] = $exclude_ids; } return $retval; } add_filter( 'bp_before_has_members_parse_args', 'exclude_roles_from_members_loop' );
But now when I need to approve I have to change the default role, (which is basically a copy of “Subscribers”) and also approve from BP registration plugin too. (double work)
Do you think this is technically correct if not, please assist me to apply your code and also how I can share my link with you in private?
Appreciate your help.
Thanks