Support

Account

Home Forums Bug Reports WYSIWYG and apply_filters 'the_content' issue Reply To: WYSIWYG and apply_filters 'the_content' issue

  • Thanks @Elliot Condon

    I put this little test page up http://galo.prompt-dev.com where:
    Debug is enabled: define('WP_DEBUG', true);
    Inside functions.php I’ve got:

    add_filter('acf/format_value/type=wysiwyg', 'format_value_wysiwyg', 10, 3);
    function format_value_wysiwyg( $value, $post_id, $field ) {
    	$value = apply_filters( 'the_content', $value );
    	return $value;
    }

    Also tried to apply_filters directly when printing the $value but not in combination with the previous function, like this:
    (like suggested here http://support.advancedcustomfields.com/forums/topic/wysiwyg-editor-jetpack-contact-form/ )

    $wysiwyg = get_field('editor');	
    echo apply_filters('the_content', $wysiwyg);

    But still haven’t got it working… I’m trying to add a working Jetpack Contact Form from a WYSIWYG Editor within a Flexible Content Field. The example page is a stand-alone test case using just a WYSIWYG Editor field.

    Find some print screens attached.