Memberlist Shortcode filters not working? – UserPro Forums https://forum.userproplugin.com/forums/topic/memberlist-shortcode-filters-not-working/feed/ Sat, 27 Apr 2024 08:58:46 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/memberlist-shortcode-filters-not-working/#post-45951 <![CDATA[Memberlist Shortcode filters not working?]]> https://forum.userproplugin.com/forums/topic/memberlist-shortcode-filters-not-working/#post-45951 Tue, 10 Feb 2015 21:23:40 +0000 Butler Web and Design I want the main search box on the memberlist filters to search BOTH the display_name and description variables to see if that word is anywhere in either of those two fields. I had to go into the code and change line 158 of functions>memberlist-functions.php to say 'compare' => 'like' instead of 'compare' => '='
In my shortcode I have memberlist_filters="description,display_name"
I remove “display_name” from that filters and it works fine, minus the searching in the display_name.
When I put it back to both, it returns ALL users PLUS ONE. (ie I have 20 regular members, when I search it shows 21 members found). I found the code (as stated above) but nothing I try works.

Any help??

]]>
https://forum.userproplugin.com/forums/topic/memberlist-shortcode-filters-not-working/#post-45952 <![CDATA[Reply To: Memberlist Shortcode filters not working?]]> https://forum.userproplugin.com/forums/topic/memberlist-shortcode-filters-not-working/#post-45952 Tue, 10 Feb 2015 22:11:31 +0000 Butler Web and Design I figured something out. I have roles set.

In my shortcode I have the following: role="ai1ec_event_assistant" to show up just members, not staff (which are contributors.

When I change line 152 which is: $query['meta_query']['relation'] = 'OR';
to this: $query['meta_query']['relation'] = 'AND';

It works as it should, pulling up non-staf that have the search string in BOTH their display name and description.
But I don’t want that, I want it to be display name and/or description (which is the use of ‘OR’ as the relation).

But when I set it to OR… ALL of my regular members show up, and the search actually applies to the staff members.
I figured this is because staff members can still edit events (as role is above). So I set my role to this:
role="ai1ec_event_assistant,subscriber" which pulls up correctly all my non-staff members (which I found some members are currently under Subscriber only.
HOWEVER now the search won’t work properly. I have it at ‘AND’ and it doesn’t work at all. I changed it back to ‘OR’ but now it kind of works, with the exception that the pagination is all wrong! It says 4 members found (with three pages) but only pages 1 & 2 have members and 3 is blank (so 8 members total, split on pages 1 and 2).

Help please! I need to get this working properly.

]]>
https://forum.userproplugin.com/forums/topic/memberlist-shortcode-filters-not-working/#post-45966 <![CDATA[Reply To: Memberlist Shortcode filters not working?]]> https://forum.userproplugin.com/forums/topic/memberlist-shortcode-filters-not-working/#post-45966 Wed, 11 Feb 2015 21:07:07 +0000 Butler Web and Design So I changed my users to all be under “Event Assistant” instead of Subscriber. But still the searching of multiple filter fields doesn’t work properly.

Please let me know if you guys can help.

Thanks!

]]>