I am attempting to post some java code between pre tags but the angel brackets get removed. For example:
private HashMap<String, HashMap<String, Integer>> featureCounts;
becomes
private HashMap> featureCounts;
Is there a way I can render the actual code? Also I am not a php developer or a wordpress expert by any means, so modifying the underlying php would be less preferred as a solution. Is there a way I can do this just using the editor?
2 Answers
If you’re just trying to display them in a page or a post, you could try using their character entities. In the Text view in the editor, type <
instead of <
and >
instead of >
.
So, for instance, in your editor’s Text view (not the Visual mode), you’d type:
<pre>
private HashMap<String, HashMap<String, Integer>> featureCounts;
</pre>
And that should do it.