• Hi Everyone,

    I am having a problem with the inbuilt WordPress CMS at the moment whereby whenever I try to enter a break using the br html tag, the CMS strips it out automatically and leaves me with no break.

    Any ideas?

    Blog – Asics Kinsei 3 Review

Viewing 1 replies (of 1 total)
  • That is sort of a problem sometimes in the WP editor. It has its ways. There are ways to get around some things but you sort of learn by trial and error.

    In the meantime you could try this. Put this code in your theme’s functions.php file.

    function linebreak() {
       return '<br />';
    }
    @add_shortcode('br', 'linebreak');

    it creates a shortcode. Basically, what it means is wherever you want to insert a linebreak, enter {br] in the Visual tab instead of <br /> in the HTML tab. That should cause WP to insert the breaks you want when the post is displayed rather than in the editor. You may need to insert them at the beginning or end of an already existing line, because if you put it on a line by itself WP is likely to wrap it in a <p> </p> combination, not what you want.

Viewing 1 replies (of 1 total)
  • The topic ‘Line Break In WYSIWYG editor’ is closed to new replies.