I have serious trouble displaying code blocks in my theme.
I want to display something like:
<something>
<something-else>
Content
</something-else>
</something>
And it works fine everywhere, but doing that inside code tag:
<code>
<something>
<something-else>
Content
</something-else>
</something>
</code>
Displays code block looking like:
<something>
<something-else>
Content
</something-else>
</something>
And setting code's CSS to:
white-space: pre-wrap;
Produces confusing:
<something>
</br>
<something-else>
</br>
Content
</br>
</something-else>
</br>
</something>
Almost perfect, but where these come from?
Additionally I'm disabling WP AutoP and it works, but not within code tags:
functions.php
remove_filter ('the_content', 'wpautop');
add_filter( 'the_content', 'wpautop' , 12);
Any ideas?
wpautop
tothe_content
, after you first remove it?code {display:inline;}
in css?