0

i have a filter to change the content on a plugin:

add_filter('the_content','replace_content');

Now i am using ACF and i copied over the content from the wordpress editor to a wysiwig editor field my filter doesn't affect it anymore.

So my question is how can i modify my filter to affect my new wysiwig custom field?

I am refering to the front end not the editor itself but the content people sees on the page.

1 Answer 1

4
add_filter('acf_the_content', 'replace_content');
4
  • Some explanation would be nice
    – cjbj
    Commented Jan 23, 2017 at 16:49
  • 1
    The filter he's using just affect Wordpress' default wysiwig. To do the same on ACF's wysiwig he needs to use the filter above. Commented Jan 23, 2017 at 16:58
  • Wow this worked thanks!. Is there an easy way to affect both without duplicating the function with a different name? Commented Jan 23, 2017 at 16:59
  • 1
    You don't need to duplicate de function, just call it on both filters. Commented Jan 23, 2017 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.