Forum Replies Created
-
AuthorPosts
-
September 4, 2018 at 5:25 pm in reply to: Search directory results page display all members ignoring search criteria. #9626andreaKeymaster
You are welcome! And I’m adding your suggestion to my to-do list.
August 29, 2018 at 11:34 pm in reply to: Search directory results page display all members ignoring search criteria. #9622andreaKeymasterGot it!
In the Edit Form screen, if you choose the Search Mode ‘is one of’ for your language field, you’ll get language check boxes in your search form.
If you prefer a multi selection drop down, you also have to add this code to your bp-custom.php file:
add_action ('bps_field_before_search_form', 'change_display'); function change_display ($f) { // replace 789 with the ID of your language field if ($f->id == 789) $f->display = 'multiselectbox'; }
August 29, 2018 at 4:40 am in reply to: Search directory results page display all members ignoring search criteria. #9620andreaKeymasterI’m sorry Rizwan, I’m not sure I understand your suggestion, could you please add more details? Thanks!
By the way, I think I found the fix for Paid Memberships Pro – BuddyPress Add On and I’m going to report that to their team.
August 28, 2018 at 5:52 pm in reply to: Search directory results page display all members ignoring search criteria. #9618andreaKeymasterHi Rizwan,
Great you found the explanation of this problem!
We have the same issue with another plugin, see:
http://dontdream.it/bp-profile-search/incompatible-plugins/
I will download a copy of the Paid Memberships Pro software, and I will investigate further. I’ll let you know what I find out.
August 27, 2018 at 7:11 pm in reply to: Search directory results page display all members ignoring search criteria. #9616andreaKeymasterHello Rizwan,
Your code works for me. If you wish I could have a look at your site to understand why it doesn’t work for you.
August 25, 2018 at 6:21 pm in reply to: Search directory results page display all members ignoring search criteria. #9615andreaKeymasterHi Rizwan,
Thank you for the code, it will help me understand what the problem is. I’ll keep you informed!
August 23, 2018 at 5:27 pm in reply to: Search directory results page display all members ignoring search criteria. #9612andreaKeymasterHi Rizwan,
I sent you an email two days ago, I’m going to send it again.
August 19, 2018 at 4:02 pm in reply to: Search directory results page display all members ignoring search criteria. #9608andreaKeymasterHi Rizwan,
Could you please send me a test login to your site? You can use my Contact page to keep it private.
andreaKeymasterHello Rizwan,
The shortcode [bps_directory] still doesn’t work with the Nouveau template pack.
If you use the Legacy template pack, you can build a directory of, say, male members with this shortcode:
[bps_directory field_39="Male"]
replacing 39 with the field ID of your ‘Gender’ field.
You can find all the details in Custom Directories, bullet C).
andreaKeymasterSure, I’ve just sent you an email. You can use that email address to contact me or, if you prefer, my Contact page.
andreaKeymasterYou are welcome, all the best with your site!
andreaKeymasterYes, I think that’s a good solution.
Please let me know if everything works for you!
andreaKeymasterIf you are already using member types for another purpose, I wouldn’t use them to also store the payment status.
I’d go back to using a profile field, adding a plugin to prevent user modifications to that field. If you prefer, you could also use this quick and dirty code in bp-custom.php:
add_action ('bp_members_admin_load', 'prevent_profile_field_update'); add_action ('wp', 'prevent_profile_field_update'); function prevent_profile_field_update () { if (!bp_current_user_can ('bp_moderate')) { $ID = 27; if (isset ($_POST['field_ids'])) { if (is_array ($_POST['field_ids'])) foreach ($_POST['field_ids'] as $k => $ids) $_POST['field_ids'][$k] = implode (',', array_diff (explode (',', $_POST['field_ids'][$k]), array ($ID))); else $_POST['field_ids'] = implode (',', array_diff (explode (',', $_POST['field_ids']), array ($ID))); } } }
Replace 27 with the ID of the field that users aren’t allowed to modify.
andreaKeymasterYou are right, that won’t work!
You can use the member type instead. Build a directory of paying members with this shortcode:
[bps_directory member_type='paid']
(replace paid with the actual member type you give to paying members)
Then you can select that directory as the results page of your search form, and you’ll get the search restricted to paying members.
Please let me know if this works for you!
-
AuthorPosts