Editor strips extra line breaks and adds its own tags
-
Hi,
I have set up my own child theme under Thematic (parent theme). My problem is a simple one to do with the HTML editor of WordPress (I think).
Regarding WordPress “pages”, when I add/edit a page, WordPress automatically strips out extra line breaks and adds its own markup. Even under the HTML tab of the editor, WordPress still adds its own <p> tags and removes extra line breaks. So if you add an image for example, the text automatically wraps around it when what you really want is the text to be placed below it (simple example).
I found that adding the following code to my functions.php disables this:
remove_filter (‘the_content’, ‘wpautop’);However with the above, you get good control on the HTML, but the end user is going to be the client (not HTML savvy), not me.
Therefore, what is a common solution to this? Should the developer (me) disable the wpautop setting and ask the client to use the editor in its basic mode, and contact me if further styling help is required?
Or should I update the CSS or any setting somehow so that the editor of WordPress can be used in its full form and I just need to optimise my code somehow?
Many thanks,
Rishi
- The topic ‘Editor strips extra line breaks and adds its own tags’ is closed to new replies.