You know how if you type straight quote marks into a regular field, WordPress will convert them into “smart quotes” (curly quotes)? Is there any way to get that same thing to happen in custom fields created by ACF?
Hi @bjtalbot
I’m not sure if this will work, but I have a feeling that WP replaces the curly quotes when you output the content like so the_content()
.
If this is true (most likely), then you can get WP to format your custom field in the same way like this:
$value = get_field('field_name');
echo apply_filters('the_content', $value);
let me know if that works.
Thanks
E
Thanks, I’ll give this a try and will let you know.
If you want a more targeted approach, run the field through wptexturize (http://codex.wordpress.org/Function_Reference/wptexturize).
echo wptexturize(get_field('my_field'));
Although the_content filter works, in addition to wptexturize it runs your content through a bunch of other transformations that might be undesirable, wrapping it in paragraph tags for instance.