Home Forums General Issues Field order + Array


Field order + Array

  • Hello!
    I am trying to display the content of my ACFs using the get_field_objects(); just as indicated in the documentation. Everything works except for two things:
    1. The order of the fields is backwards (displays last one first etc.)
    2. All of the fields that have options (taxonomies etc.) give a result of “Array” instead of the actual value.
    Any suggestions will be greatly appreciated!
    Here is the code from the documentation that I am using:

    $fields = get_field_objects();
    if( $fields )
    	foreach( $fields as $field_name => $field )
    		echo '<div>';
    			echo '<h3>' . $field['label'] . '</h3>';
    			echo $field['value'];
    		echo '</div>';
Viewing 1 post (of 1 total)

The topic ‘Field order + Array’ is closed to new replies.