Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show members based on custom field checkboxes

  • Avatar of lz430
    lz430
    Participant

    @lz430

    Hey everyone!!
    I need to show only certain profiles if either of 2 custom check boxes are checked.

    I have no idea how to do this. I know WordPress and PHP, but Buddypress is alluding me. I’ve tried Googling but nothing is helping.

    I’ve taken the code from Members Loop and I have all 4 members(more to come) displayed.

    I thought I could modify the top part of the code like this:

    
        	while ( bp_members("custom_field" === "checked") ) : bp_the_member(); 
     
    

    Can anyone help me modify that code to show only members that have either 1 of the 2 or both check boxes?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of lz430
    lz430
    Participant

    @lz430

    Still needing help! Anyone out there today?

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

    Just a little tip for when you get your code working – check the pagination count is updated to account for the members you’ve excluded from the loop.

    Avatar of lz430
    lz430
    Participant

    @lz430

    Thanks Henry.

    I should point out, that I am dealing with radio buttons, not check boxes. Not sure how I mixed those 2 up.

    Still needing help here.

    Avatar of mohammad@duable.com
    mohammad@duable.com
    Participant

    @duablellc

    If you still need help, post here and I’ll put together a function for you.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.