Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show members based on custom field checkboxes


  • 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)

  • lz430
    Participant

    @lz430

    Still needing help! Anyone out there today?


    Henry
    Member

    @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.


    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.


    mohammad
    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)
  • The topic ‘Show members based on custom field checkboxes’ is closed to new replies.
Skip to toolbar