• I am using the ACF (Advanced Custom Fields) plugin on my site. I have Custom Layouts + Search and Filter Pro setup as well. ACF and Custom Layouts don’t seem to work well for arrays, though. When I drag out the Custom Field element to the Template, and choose the custom field (which is an ACF), it says “Custom field not found for this post”. After doing some digging I found that the problem was because the ACF returns an array. The workaround I found was to edit the file custom-layouts/includes/template/elements/class-custom-field.php after line 55 to check if the returned value is an array. And, if so, to convert it to a string.

    I’m wondering if there is a better way to do this (rather than editing the plugin file directly), or if this is a feature that needs to be added in future releases.

    Thanks in advance for your response.

  • The topic ‘Using ACF Custom Field Array in Template’ is closed to new replies.