Forum Replies Created
-
Hello Shane,
I think you are correct. It’s the members loop or some custom function . I’m unable to find it so far, but I’m determined to move ahead. Question for you – If I want an if-then statement so Men can only see Women and Women can see both Men/Women.
Something like…
How can I accomplish this?
Thanks!
Hi Shane,
I tried the 2015 theme and had the same problem. Just to confirm, http://yourURL/members/member name/friends/requests/ – gave you the correct friend requests and not all members? If so, you are correct and I need to keep digging. Thanks.
Hello Shane,
Sorry about that. Here is the link again. There is no visible problem in the members-loop layout, only women show as planned. I isolated the function and the problem persists, so I know it is not other custom code. That filter adjustment didn’t work. I’m going to keep working on it, if another solution comes to mind, please let me know. Thanks!
Hello Shane,
It works. Thanks. However after extensive testing, I’ve found that it affects the friend request function loop. Basically, all members end up requesting a friend request after applying the code. I’ve attached without_code and with_code screenshot examples. Any ideas how I can fix that? Thanks so much.
Hello Shane,
That code didn’t work. However, the following code does work. One problem, when filtering (ex. Type=Online, or Type=Newest) it ignores the code and the gender returns. Any idea why? Thanks.
PS. I put in Pastebin because I got an error when I put it in forum code.
Hi Shane,
Thanks for the quick reply! I’ll try to use the code function. The second code didn’t work and the first code gave me the error
Parse error: syntax error, unexpected ‘=’ in /home/mysite/public_html/wp-content/plugins/bp-custom.php on line 26
Line 26 is
retval['include'] = $woman_ids;
Full code below. Any ideas? Appreciated…
<?php if ( !defined( 'BP_AVATAR_THUMB_WIDTH' ) ) define( 'BP_AVATAR_THUMB_WIDTH', 120 ); //change this with your desired thumb width if ( !defined( 'BP_AVATAR_THUMB_HEIGHT' ) ) define( 'BP_AVATAR_THUMB_HEIGHT', 120 ); //change this with your desired thumb height if ( !defined( 'BP_AVATAR_FULL_WIDTH' ) ) define( 'BP_AVATAR_FULL_WIDTH', 580 ); //change this with your desired full size,weel I changed it to 260 <img src="http://buddydev.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley"> if ( !defined( 'BP_AVATAR_FULL_HEIGHT' ) ) define( 'BP_AVATAR_FULL_HEIGHT', 580 ); //change this to default height for full avatar function see_woman_gender( $retval ) { global $wpdb; $field_id = 3; $field_value = 'Woman'; $query = "SELECT user_id FROM " . $wpdb->prefix . "bp_xprofile_data WHERE field_id = " . $field_id . ' AND field_value = ' . $field_value; $woman_ids = $wpdb->get_col( $query ); if ( !empty( $woman_ids ) ) retval['include'] = $woman_ids; return $retval; } add_filter( 'bp_after_has_members_parse_args', 'see_woman_gender' ); ?>
Hello Henry,
Thanks for your reply. I’d like it to output “35 , 170 cm., ID#22” Can you point me in the right direction? Thanks so much.
Thanks Shanebp, got it working. I have some custom work I need to have done for my site, are you available? How do I contact you?
Hello shanebp,
I want to implement this code in the Profile page to show whether the member is online or not. How do I do that? After adding the function to the functions file, how do I call it?
Thanks.
Got it working. Closed.
Well, I tried it, can’t get it to work. Where can I post as a paid job for Buddypress specifically?
Thanks, can you tell me what I’m doing wrong? My code is below…
`
@`
@naijaping – Thanks for that link. Were you able to get it to work with an installation of buddypress?