Support

Account

Home Forums Add-ons Repeater Field WYWIWYG and the_content filter

Solving

WYWIWYG and the_content filter

  • This didn’t work for us. After entering the code in functions.php it hid everything within tab_content. Please advise, thanks.

  • Hi @healthfirst

    Please remember that the filter ‘the_content’ shoudl only ever be run on the front end of the website.

    I don’t know what ‘tab_content’ is, but it sounds like it should be in the admin.
    Please use the correct filter depending on your ACF version and always debug your code to test if it is working / not working
    http://www.advancedcustomfields.com/resources/how-to/debug/

  • This reply has been marked as private.
  • Hi @healthfirst

    The functions.php file is used to hook into both the front and back ends of the website to customize many parts.

    the_content is a filter which should only be used on the front end of the website. As in, shown in a page template, not shown in the wp-admin.

    Can you please confirm what version of ACF you are using?

    You mentioned ‘Tab_content’ is referring to the tab content (WYSIWYG) in the Admin folder. So am I right to assume the problem in the backend (wp-admin)?

    I don’t know what <?php build_i_world_map(1); ?> is but it shouldn’t be related to this issue.

    The original code should only modify the WYSIWYG value on the front end of the website (page template), but should not ever have changed the value in the backend. The backend should have had no changes from the code.

    If you are running ACF v4.x.x, then this is the wrong code. Please use format_value_for_api, not format_value and this could explain why it is being run in the backend.

  • This reply has been marked as private.
  • Hi @healthfirst

    Can you please provide login info, and I’ll take a look.

    Cheers
    E

  • And please check your console log for any JS errors on the page. This could explain why the WYSIWYG field is no longer working

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘WYWIWYG and the_content filter’ is closed to new replies.