Title: Displaying Code in Posts
Last modified: August 22, 2016

---

# Displaying Code in Posts

 *  [CharBram](https://wordpress.org/support/users/charbram/)
 * (@charbram)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/displaying-code-in-posts-1/)
 * Hello everyone,
 * I need some help with consistently displaying my code in word press posts. All
   my posts include code and WordPress is just a complete nightmare to deal with
   in this regard.
 * I have tried to use the Pre and code tags but WordPress just seems to randomly
   remove bits of C code that it doesn’t like, even when using the Pre and Code 
   tags.
 * I keep searching to get help on this topic but I keep getting posts that are 
   6 years old and recommend plugins that are no longer working with WordPress.
 * At this point, I am really just considering dumping wordpress and using a static
   html generating library instead.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/displaying-code-in-posts-1/#post-5537375)
 * Are you switching from visual editor to the text editor when this is happening?
   If you’re switching editors WordPress will strip some code it thinks is invalid.
   You can disable the visual editor in your user profile page (Users > Your Profile).
 * Can you post code that doesn’t work in the editor here.
 * Have you tried it with a syntax highlighter plugin?
    [https://wordpress.org/plugins/syntaxhighlighter/](https://wordpress.org/plugins/syntaxhighlighter/)
 *  Thread Starter [CharBram](https://wordpress.org/support/users/charbram/)
 * (@charbram)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/displaying-code-in-posts-1/#post-5537421)
 * keesiemeijer,
 * Thanks for replying, I was being an idiot and forgot that when using C code that
   has <> in it, I would have to escape out the <> for html! Still, I don’t want
   to have to escape out everything! 🙁
 * What do you think of the plug-in you suggested? It says it is only Compatible
   up to: 3.9.2. Should I worry about that?
 * I really just wish there was an easier way to format and throw code into wordpress!
   🙁
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/displaying-code-in-posts-1/#post-5537431)
 * The plugin is from a very trusted author and is used by wordpress.com. I use 
   it myself without any problems.
 * There are also other plugins you can use :
    [https://wordpress.org/plugins/tinymce-preformatted/](https://wordpress.org/plugins/tinymce-preformatted/)
 * Or maybe this solution (never tried it myself):
    [https://stackoverflow.com/questions/18313031/how-to-prevent-wordpress-tinymce-from-stripping-url-having-no-link-text/18313848#18313848](https://stackoverflow.com/questions/18313031/how-to-prevent-wordpress-tinymce-from-stripping-url-having-no-link-text/18313848#18313848)
 *  Thread Starter [CharBram](https://wordpress.org/support/users/charbram/)
 * (@charbram)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/displaying-code-in-posts-1/#post-5537545)
 * keesiemeijer,
 * Thanks! I will look into it and see how it is!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Displaying Code in Posts’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [CharBram](https://wordpress.org/support/users/charbram/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/displaying-code-in-posts-1/#post-5537545)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
