Articles of line breaks

How to show the contants in front end same as visual editor with space / linebreak?

My visual editor looks like this: My text editor looks like this: But my front end looks like this: I know that the wordpress automatically removes linebreaks. So I installed tineMCE advace editor and checked “stop removing <p> and <br> tags” on the plugin setting. After that line breaks were there. I saw the space. […]

Pasting code into WordPress post – LFs being eaten

I’m sure this is an inappropriate question for this SE because it’s not programming related AFAIK but maybe someone here has an idea. I’ve been posting code into my blog for years and have had no formatting concerns. Now all of a sudden, when I copy and paste code from whatever IDE I’m working in, […]

How can I remove <br /> line breaks from manually formatted HTML?

I see a lot of posts here and elsewhere having trouble adding line breaks for some reason, but I’m trying to remove them. I’m new to WP, and I see that when editing in “HTML” mode the text is rendered in paragraph tags for double line breaks, and <br> for single line breaks, without the […]

br tags on backend not showing up on frontend

I was really searching here for a solution for this but I couldn’t find anything. Problem: br and/or br / tags which I put into my content on the backend were just not showing up on the frontend. No matter what I did – enter+shift in the visual or insert the tags manually in the […]

Processing shortcodes in groups (separated by line breaks)?

The Project I’m working on a plugin to resize and embed rows of images using shortcodes that will be converted into <img> tags. In most cases there will be multiple images per row, and the rows are separated by line breaks. Here’s a simplified example of what 4 rows might look like in the text […]

Shift-Enter in tinyMCE (wp 3.3.1) not working

With wordpress version 3.3.1, shift-enter to insert linebreaks in pages and posts is not working anymore. Has anybody observed this as well? Is there a fix for that? Thanks!

Unwanted line break before <input>

Based on help here ( Use of Javascript with Dojo/Dijit on a WordPress page) I got Dijit half way working using a custom template. But, I still can’t figure out why WP inserts breaks where it does. I’d like to keep as much of the page in the WP Page, and as little in the […]

How to prevent pages from automatically adding line breaks?

I’m trying to style a form on a website, but I’m hitting a snag. WordPress is automatically generating <br> tags when I directly edit the HTML for pages. What I’ve got is this: <fieldset> <legend>* Your name:</legend> <ul class=”singleLine”> <li> <span> <input id=”FName” type=”text” name=”FName” size=”20″ maxlength=”20″ /> <label for=”FName”>First</label> </span> <span> <input id=”LName” type=”text” […]

My simple custom shortcode is not longer working (possibly due to upgrade to WordPress 4.4 ?)

I have a simple function in functions.php that creates a custom shortcode: function my_line_break() { return “<br>”; } add_shortcode( ‘new line’, ‘my_line_break’ ); Now, I don’t know if this happened after upgrading to 4.4 but it’s not longer working and pages just render [new line] in plain text. Anyone can help with this? I looked […]

Preserving tabs and line breaks in <pre><code> when switching from HTML to Visual Editor

Tabs placed in a <pre><code></code></pre> block are stripped and line breaks are removed leaving a single continuous line of text. This occurs when switching from html to visual editors. Is there a setting in TinyMCE to avoid this? BEFORE: AFTER: Here it even garbles the code and spits parts of it out the <pre>… EDIT: […]