This should be easy points as I forgot how and can’t find it on Google.
How do I accomplish something like this:
Blah Blah Blah some code
Blah Blah
in wordpress? pre
doesn’t work as it will give a line break.
This should be easy points as I forgot how and can’t find it on Google.
How do I accomplish something like this:
Blah Blah Blah some code
Blah Blah
in wordpress? pre
doesn’t work as it will give a line break.
You must be logged in to post a comment.
It may be better to use
<code>
than<pre>
to display inline code, for two reasons:<code>
are a much better match than<pre>
But definitely use CSS classes (as @Blender points out).
There’s a caveat:
<code>
doesn’t escape<>
brackets, so if you want to display HTML then you have to manually escape brackets as<
and>
. (which you should really do anyway; tags in HTML really should be clearly distinguished from data)<tt>text</tt> gives
text
Wait… WordPress? What HTML tags does it support?
You can have an inline
<pre>
by adding some custom CSS to your theme’s stylesheet:Now, when you write:
It shows up like this: