Support

Account

Home Forums Feature Requests Passing multiple field IDs with get_field(). Reply To: Passing multiple field IDs with get_field().

  • Hi @chrisdunnbirch

    Thanks for the feature request. I’ll consider adding this in, but for now, you could quickly write something like this:

    
    <?php 
    
    $social = array();
    
    foreach( array('facebook', 'twitter', 'etc') as $k ) {
    	
    	$v = get_field($k, 'option');
    	
    	if( $v ) {
    		
    		$social[ $k ] = $v;
    	}
    	
    }
    
    if( !empty($social) ) {
    	
    	
    }
    
     ?>