Title: How add code snippets?
Last modified: August 18, 2016

---

# How add code snippets?

 *  [bitziz](https://wordpress.org/support/users/bitziz/)
 * (@bitziz)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/how-add-code-snippets/)
 * How to add code snippets to posts without WP parsing them?

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

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/how-add-code-snippets/#post-47166)
 * Use the encoder: [http://resources.wordpress.org/tools/encode/](http://resources.wordpress.org/tools/encode/)
 *  Thread Starter [bitziz](https://wordpress.org/support/users/bitziz/)
 * (@bitziz)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/how-add-code-snippets/#post-47167)
 * I just ended up using the textarea code, works out pretty well though, check 
   this out
    [http://blog.jydesign.biz/index.php?cat=5](http://blog.jydesign.biz/index.php?cat=5)
 *  [Sushubh](https://wordpress.org/support/users/sushubh/)
 * (@sushubh)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/how-add-code-snippets/#post-47168)
 * check the last line inside the code.
    i think u left something out…
 *  Thread Starter [bitziz](https://wordpress.org/support/users/bitziz/)
 * (@bitziz)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/how-add-code-snippets/#post-47170)
 * Damn… it doesn’t work it adds and <br> to the code. I will try the code encoder
   then.
 *  [absolut](https://wordpress.org/support/users/absolut/)
 * (@absolut)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/how-add-code-snippets/#post-47179)
 * Hey, that text encoder is nifty! Has anyone created a bookmarklet so that we 
   can easily access the page? Or could someone create one, please?
 *  Thread Starter [bitziz](https://wordpress.org/support/users/bitziz/)
 * (@bitziz)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/how-add-code-snippets/#post-47183)
 * It’s something that you can create yourself in php.
    It simply does a bunch of
   string replaces. `Replace < with < Replace > with > Replace ' with ' Replace "
   with &quot; You can do that with the following simple PHP codes, assuming your
   input data is $data. $data = str_replace("<", "<", $data); $data = str_replace("
   >", ">", $data); $data = str_replace("'", "'", $data); $data = str_replace('"',"&
   quot;", $data); That should take care of the string replaces.

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

The topic ‘How add code snippets?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [bitziz](https://wordpress.org/support/users/bitziz/)
 * Last activity: [22 years, 1 month ago](https://wordpress.org/support/topic/how-add-code-snippets/#post-47183)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
