Yes, there are reasons that ACF uses acf_the_content instead of the_content. There are some minor changes in the order that filters are added, but the main reason is that ACF does not run include all the filters for WYSIWYG fields that are included for the main content field because of bugs and other issues. For example it does not include “prepend_attachment” because this causes the attachment image to be prepended for every wysiwyg field. I’m sure there are others I’m not aware of.
I suspect that the reason that the content is not formatted when getting it from the cache is that ACF allows you to get the content of a WYSIWYG field unformattted, so it is not formatted before it’s added to the cache in the way that the main content editor is. You can solve this problem by always getting the unformatted value and then applying acf_the_content to it.
$content = get_field('some-wysiwyg-field', false, false); echo apply_filters('acf_the_content', $content);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.