Title: Adding code to posts &#8211; revisited
Last modified: August 18, 2016

---

# Adding code to posts – revisited

 *  [bitziz](https://wordpress.org/support/users/bitziz/)
 * (@bitziz)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/adding-code-to-posts-revisited/)
 * After doing some reading and looking around I figured out a way to insert code
   into html without all the messy string replaces.
    Here’s the, html support a 
   tag ` that will allow anything that's placed between `` and ` to not be parsed.
   The problem with this is that first of all WP adds <br> to the end of every line
   so if you do this `<tr><td> </td></tr> it will be shown like this <tr><td><br\
   > </td></tr><br \> however if you do the following: <tr><td> </td></tr> then 
   the code will be shown in the right way. To help you guys who don't want to type
   out the tags all the time. Add the following lines to after line 119 in your 
   quicktags.js It will give you a button called code that will write the tags for
   you. edButtons[edButtons.length] = new edButton('ed_code' ,'code' ,'' ,'' ); 
   I would highly recommend using CSS to customize the appearance of the code tag.

Viewing 1 replies (of 1 total)

 *  [gadlen](https://wordpress.org/support/users/gadlen/)
 * (@gadlen)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/adding-code-to-posts-revisited/#post-47912)
 * This HTML code insertion hack is exactly what I’m looking for. Unfortunately,
   it doesn’t seem to be working… and since it’s not working, I can’t even read 
   the entirety of your post! If you’ve got a solution, I’d love to hear it! This
   one has been driving me crazy! Reach me at [http://lee.org](http://lee.org).

Viewing 1 replies (of 1 total)

The topic ‘Adding code to posts – revisited’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [gadlen](https://wordpress.org/support/users/gadlen/)
 * Last activity: [21 years, 5 months ago](https://wordpress.org/support/topic/adding-code-to-posts-revisited/#post-47912)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
