Support

Account

Home Forums ACF PRO Check for a value in a custom query Reply To: Check for a value in a custom query

  • Hi John,

    I’m afraid your solution is not working for me.
    Think I need a ‘foreach’ loop to get this working the way I want.
    This is what I’m looking for:

    
    -- Division Name 1 ---
    Person 1
    Person 2
    Person 3
    
    -- Division Name 2 ---
    Person 1
    Person 2
    
    -- Division Name 3 ---
    Person 1
    Person 2
    Person 3
    Person 4
    Person 5
    
    etc.

    This means that I need to know what value (showing part of the query of my earlier post) is in

    
    'label' 	=> array (
    			'key' 	=> 'medewerker_werkzaam_bij',
    		),
    

    The value should range from 1 to 7. But I really have no idea how to put that value (an ACF field) into a variable so I can check / validate that in a foreach or while loop.