Title: Code tag not working?
Last modified: August 19, 2016

---

# Code tag not working?

 *  Resolved [moose1](https://wordpress.org/support/users/moose1/)
 * (@moose1)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/code-tag-not-working/)
 * Hello,
 * I want to create a post that shows users how to use the `embed` tag to embed 
   videos. I have a link to the [codex page](http://codex.wordpress.org/Embeds) 
   about this but I also want to paste a code example into my post, just as it’s
   done on that codex page.
 * When I try to do this using the code tag, however, WP is just embedding the video.
   This is what I’ve got in my post:
 * >  Below is an example of how to use the embed shortcode to embed a YouTube video:
   > `[
   > embed width="400" height="400"]http://www.youtube.com/watch?v=-XJ4qi-PeMs[/
   > embed]`
 * Unlike above, I’m not getting the code but the actual video embed.
 * How can I get the code to show as it does on the codex page and above? From viewing
   source on that page, it looks like they’ve just used the code tag as well.
 * I’ve also tried using the code markup plugin but still no luck.
 * Thanks.

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

 *  [David Calhoun](https://wordpress.org/support/users/dpcalhoun/)
 * (@dpcalhoun)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/code-tag-not-working/#post-1946427)
 * When you say “code tag”, are you referring to this?
 * [http://codex.wordpress.org/Writing_Code_in_Your_Posts](http://codex.wordpress.org/Writing_Code_in_Your_Posts)
 *  Thread Starter [moose1](https://wordpress.org/support/users/moose1/)
 * (@moose1)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/code-tag-not-working/#post-1946479)
 * David,
 * Yes, that’s the one I’m referring to. Thanks for the link.
 * I was able to get it to work using the HTML characters for the square brackets
   and the forward slashes, but if I switch between visual and HTML view in the 
   editor, it strips out the HTML.
 * But, the HTML did work.

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

The topic ‘Code tag not working?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [moose1](https://wordpress.org/support/users/moose1/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/code-tag-not-working/#post-1946479)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
