Why is WordPress WYSIWYMG and how do I make it WYSIWYG?

After you post your content, WordPress will pass the_content() function through a number of filtering function’s. There are four of them, wptexturize(), convert_smilies(), convert_chars(), and wpautop(). All of these are defined in wp-includes/formatting.php and are referenced in wp-includes/default-filters.php.

To remove these filtering functions you can disable them by putting this in your functions.php theme file:

remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
remove_filter('the_content', 'convert_smilies');
remove_filter('the_content', 'convert_chars');

That should remove all formatting between what you save in TinyMCE (the WYSIWYG editor) and the front end view of your website. For more reference on what each of these does refer to the codex.

I hope this helps, best of luck!

Leave a Comment