<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Amazing hack for fixing the code changing habits of the WordPress editor</title>
	<atom:link href="http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/</link>
	<description>wordpress tricks, hacks, and tips</description>
	<lastBuildDate>Wed, 09 May 2012 06:53:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Andrew</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-61916</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 13 Jan 2011 02:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-61916</guid>
		<description>Try this 1 line of code out, it stops wordpress from automatically putting in p tags (might work for others to) simply put it above the_content(); function. Anyway here it is, should help stop wordpress from automatically messing up your code.
 
&lt;?php remove_filter (&#039;the_content&#039;, &#039;wpautop&#039;); ?&gt;</description>
		<content:encoded><![CDATA[<p>Try this 1 line of code out, it stops wordpress from automatically putting in p tags (might work for others to) simply put it above the_content(); function. Anyway here it is, should help stop wordpress from automatically messing up your code.<br />
 <br />
&lt;?php remove_filter (&#8216;the_content&#8217;, &#8216;wpautop&#8217;); ?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Modavate</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60872</link>
		<dc:creator>Modavate</dc:creator>
		<pubDate>Thu, 18 Feb 2010 06:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60872</guid>
		<description>Thanks Ron!
The clear_both shortcode worked. I simply added a height to the style, so all I use is the [clear_both] with no DIVs. I also had to edit your apostrophes otherwise my site went blank.</description>
		<content:encoded><![CDATA[<p>Thanks Ron!<br />
The clear_both shortcode worked. I simply added a height to the style, so all I use is the [clear_both] with no DIVs. I also had to edit your apostrophes otherwise my site went blank.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wordpress davon abhalten, automatisch Code zu ändern &#171; Franz Neumeier&#39;s &#34;Ceterum Censeo&#34; Blog</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60840</link>
		<dc:creator>Wordpress davon abhalten, automatisch Code zu ändern &#171; Franz Neumeier&#39;s &#34;Ceterum Censeo&#34; Blog</dc:creator>
		<pubDate>Mon, 01 Feb 2010 08:27:24 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60840</guid>
		<description>[...] Rinaldi hat nun vor ein paar Tagen bei WPGarage in einem Kommentar eine Lösung präsentiert, die ich genial finde &#8211; einfach weil sie für meine Zwecke ohne [...]</description>
		<content:encoded><![CDATA[<p>[...] Rinaldi hat nun vor ein paar Tagen bei WPGarage in einem Kommentar eine Lösung präsentiert, die ich genial finde &#8211; einfach weil sie für meine Zwecke ohne [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ron</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60816</link>
		<dc:creator>ron</dc:creator>
		<pubDate>Sun, 24 Jan 2010 03:35:24 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60816</guid>
		<description>I forget to mention that to use the shortcodes, they must be on a line by themselves.   For example...
..... your markup and text here....
 
[clear_both]
 
.... More text here.
 
The thing to notice is the blank lines around the short code.  This must also be done with the [div] shortcode.  Without these blank links, you will get spurious &lt;br /&gt; tags.  Its weird.  I guess the multiple blank lines create multiple sequential &lt;br /&gt; tags, which then get stripped out all at once.  I tell you if I wasn&#039;t so vested in WP I&#039;d find something else.  Their overprotective practices are just screwy.
 </description>
		<content:encoded><![CDATA[<p>I forget to mention that to use the shortcodes, they must be on a line by themselves.   For example&#8230;<br />
&#8230;.. your markup and text here&#8230;.<br />
 <br />
[clear_both]<br />
 <br />
&#8230;. More text here.<br />
 <br />
The thing to notice is the blank lines around the short code.  This must also be done with the [div] shortcode.  Without these blank links, you will get spurious &lt;br /&gt; tags.  Its weird.  I guess the multiple blank lines create multiple sequential &lt;br /&gt; tags, which then get stripped out all at once.  I tell you if I wasn&#8217;t so vested in WP I&#8217;d find something else.  Their overprotective practices are just screwy.<br />
 </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ron</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60815</link>
		<dc:creator>ron</dc:creator>
		<pubDate>Sun, 24 Jan 2010 03:31:52 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60815</guid>
		<description>I have a solution to this problem.  It took me all day to figure it out, and it is very hacky.  I&#039;m so pissed at WP for not having features to turn OFF their &#039;autop&#039; function and allow html editing to be true html editing.  Even if just for admin-status users, it would have saved ALL of us a bunch of time.
My solution is to use shortcodes.  They are not stripped out, and they can be used to insert div tags after the stripping has taken place.  Here is my code...
 

// The [clear_both] shortcode
function shortcode_clear_both() {
 return &#039;&lt;div style=&quot;clear:both&quot;&gt;&lt;/div&gt;&#039;;
}
add_shortcode( &#039;clear_both&#039;, &#039;shortcode_clear_both&#039; );

// The [div] shortcode
function shortcode_div( $atts, $content=null ) {
 extract(shortcode_atts(array(
 &#039;class&#039; =&gt; &#039;&#039;,
 &#039;style&#039; =&gt; &#039;&#039;,
 &#039;id&#039;    =&gt; &#039;&#039;,
 ), $atts));
 $ret = &#039;&lt;div&#039;;
 if (!empty($style)) $ret .= &#039; style=&quot;&#039;.$style . &#039;&quot; &#039;;
 if (!empty($class)) $ret .= &#039; class=&quot;&#039;.$class . &#039;&quot; &#039;;
 if (!empty($id))    $ret .= &#039; id=&quot;&#039;.$id . &#039;&quot; &#039;;
 $ret .= &#039;&gt;&#039;;
 $ret .= $content . &#039;&lt;/div&gt;&#039;;
 return $ret;
}
add_shortcode( &#039;div&#039;, &#039;shortcode_div&#039; );

Hope this helps someone out there.
 </description>
		<content:encoded><![CDATA[<p>I have a solution to this problem.  It took me all day to figure it out, and it is very hacky.  I&#8217;m so pissed at WP for not having features to turn OFF their &#8216;autop&#8217; function and allow html editing to be true html editing.  Even if just for admin-status users, it would have saved ALL of us a bunch of time.<br />
My solution is to use shortcodes.  They are not stripped out, and they can be used to insert div tags after the stripping has taken place.  Here is my code&#8230;<br />
 </p>
<p>// The [clear_both] shortcode<br />
function shortcode_clear_both() {<br />
 return &#8216;&lt;div style=&#8221;clear:both&#8221;&gt;&lt;/div&gt;&#8217;;<br />
}<br />
add_shortcode( &#8216;clear_both&#8217;, &#8216;shortcode_clear_both&#8217; );</p>
<p>// The [div] shortcode<br />
function shortcode_div( $atts, $content=null ) {<br />
 extract(shortcode_atts(array(<br />
 &#8216;class&#8217; =&gt; &#8221;,<br />
 &#8216;style&#8217; =&gt; &#8221;,<br />
 &#8216;id&#8217;    =&gt; &#8221;,<br />
 ), $atts));<br />
 $ret = &#8216;&lt;div&#8217;;<br />
 if (!empty($style)) $ret .= &#8216; style=&#8221;&#8216;.$style . &#8216;&#8221; &#8216;;<br />
 if (!empty($class)) $ret .= &#8216; class=&#8221;&#8216;.$class . &#8216;&#8221; &#8216;;<br />
 if (!empty($id))    $ret .= &#8216; id=&#8221;&#8216;.$id . &#8216;&#8221; &#8216;;<br />
 $ret .= &#8216;&gt;&#8217;;<br />
 $ret .= $content . &#8216;&lt;/div&gt;&#8217;;<br />
 return $ret;<br />
}<br />
add_shortcode( &#8216;div&#8217;, &#8216;shortcode_div&#8217; );</p>
<p>Hope this helps someone out there.<br />
 </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60028</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 09 Jun 2009 21:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60028</guid>
		<description>Yup - things like iframes  and a &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt; that let&#039;s me reatart text properly under pictures are
still being stripped out - absolutely maddening - there MUST be a solution out there somewhere!</description>
		<content:encoded><![CDATA[<p>Yup &#8211; things like iframes  and a &lt;div style=&#8221;clear:both;&#8221;&gt;&lt;/div&gt; that let&#8217;s me reatart text properly under pictures are<br />
still being stripped out &#8211; absolutely maddening &#8211; there MUST be a solution out there somewhere!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maurice</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60016</link>
		<dc:creator>Maurice</dc:creator>
		<pubDate>Fri, 05 Jun 2009 05:19:23 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-60016</guid>
		<description>No, we still need a solution.  WP 2.7.1 is STILL chewing up even basic HTML code and throwing it away.  I will insert some IMG and &lt;a&gt; tags and it will come back 3 saves later and throw them all away.  Any solutions anyone?</description>
		<content:encoded><![CDATA[<p>No, we still need a solution.  WP 2.7.1 is STILL chewing up even basic HTML code and throwing it away.  I will insert some IMG and &lt;a&gt; tags and it will come back 3 saves later and throw them all away.  Any solutions anyone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-53304</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 16 Apr 2009 10:45:12 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-53304</guid>
		<description>@alan - AFAIK this hack no longer works because it is no longer needed. I don&#039;t think DIV tags are converted to P tags in WordPress anymore.

</description>
		<content:encoded><![CDATA[<p>@alan &#8211; AFAIK this hack no longer works because it is no longer needed. I don&#8217;t think DIV tags are converted to P tags in WordPress anymore.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-52813</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Tue, 14 Apr 2009 14:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-52813</guid>
		<description>This hack no longer works in wordpress 2.7.1.

Does anyone have a work around for that version?</description>
		<content:encoded><![CDATA[<p>This hack no longer works in wordpress 2.7.1.</p>
<p>Does anyone have a work around for that version?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Plugins and hacks for improving the WordPress TinyMCE editor &#124; Wordpress Garage</title>
		<link>http://wpgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-37336</link>
		<dc:creator>Plugins and hacks for improving the WordPress TinyMCE editor &#124; Wordpress Garage</dc:creator>
		<pubDate>Mon, 09 Feb 2009 15:02:45 +0000</pubDate>
		<guid isPermaLink="false">http://wordpressgarage.com/tips/make-wordpress-editor-stop-changing-code/#comment-37336</guid>
		<description>[...] few days ago I wrote about a way to make the WordPress TinyMCE text editor stop stripping div tags. The original code that I wrote didn&#8217;t work, but I subsequently found a solution that I [...]</description>
		<content:encoded><![CDATA[<p>[...] few days ago I wrote about a way to make the WordPress TinyMCE text editor stop stripping div tags. The original code that I wrote didn&#8217;t work, but I subsequently found a solution that I [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

