Support

Account

Home Forums General Issues Field order + Array

Unread

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)

You must be logged in to reply to this topic.