Wordpress does a strange thing, if you switch between visual and "text" modes (the HTML mode has been renamed to 3.5 update), it removes any tags that seem empty, which often happens. This may be what you are experiencing if I understand the problem correctly.
If you are just trying to display the code on your website, you can wrap the code as follows:
<code><p>Example code post</p></code>
This is described here: http://codex.wordpress.org/Writing_Code_in_Your_Posts
If this is a block of code that does not need to be wrapped, you can also use the "pre" tag, for example:
<pre><code><p>Example code post</p></code></pre>
Itβs described very well here: <code> vs <pre> vs <samp> for inline and fragmented code snippets
Ross edman
source share