Title: Posting HTML code in WordPress
Last modified: August 18, 2016

---

# Posting HTML code in WordPress

 *  [jayeshj](https://wordpress.org/support/users/jayeshj/)
 * (@jayeshj)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/)
 * Hi All,
 * I am pretty new to word press and is now updating my site’s blog (wordpress) 
   with few data. I want some help regarding the below
 * 1 ) I would like to post some data code ( html or php extra )
 * For example I want to update the blog with a HTML code for some solution. When
   I try to do this I get a post which is blank.
 * 2 ) I want to make the blog read only. That only I should be the person posting
   the contents.
 * 3 ) How to enable search feature to locate the contents in the blog.
 * I hope to get your guidance.
 * I am not sure if these queries are repeated. I did search a bit but could not
   find the answers. Sorry, if these questions are duplicates.
 * Thanks in advance for your time.

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

 *  [Karrde](https://wordpress.org/support/users/karrde/)
 * (@karrde)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374463)
 * 1) Use the `<code>` and `</code>` tags around the HTML in your post, and it should
   display properly.
 * 2) To write a post, you generally need to have a username and password on the
   blog – just don’t let anyone else register! Also, it might pay to have a look
   at [Roles and Capabilities](http://codex.wordpress.org/Roles_and_Capabilities).
 * 3) [http://codex.wordpress.org/Creating_a_Search_Page](http://codex.wordpress.org/Creating_a_Search_Page)
 *  Thread Starter [jayeshj](https://wordpress.org/support/users/jayeshj/)
 * (@jayeshj)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374469)
 * Hi Karrde,
 * Thank you for the guidance.
 * It was really helpful. Thank you once again.
 *  Thread Starter [jayeshj](https://wordpress.org/support/users/jayeshj/)
 * (@jayeshj)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374470)
 * Hi Karrde,
 * I have posted the below data in to the blog.
 * **`<html>`**
 * <head>
 * <title>abcd.com</title>
 * <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 * </head>
 * <script language="JavaScript">
 * document.write("<frameset rows=* frameborder=NO border=0 framespacing=0 cols=*
   >");
 * document.write("<frame name=main src=http://www.yahoo.com"+document.location.
   search+">");
 * document.write("</frameset>");
 * document.write("<noframes>");
 * document.write("< body bgcolor=#FFFFFF text=#000000>");
 * document.write("</body></noframes>");
 * </script>
 * </html>
 * And the output I got again is a blank page. What am I doing wrong here.
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374473)
 * what the heck?!? You’re putting that all in a post using the post editor?!?
 * Um, why?
 * WordPress, and the theme you’re using, already provide all the framework (`<html
   >, <head>, <body>` tags, for instance).
 * You, as author, provide content using the Write Post or Write Page options. Your
   theme provides layout.
 * Perhaps if you explained a bit exactly what it is you’re trying to do…
 *  Thread Starter [jayeshj](https://wordpress.org/support/users/jayeshj/)
 * (@jayeshj)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374490)
 * Hi HandySolo,
 * Sorry for putting that.
 * I just want to put a blog post which has the above html code.
 * But when I create a post like that I am getting a blank page. So I was adviced
   by Karrde to put the code with a ` ` block. I tried the same and it didn’t work.
   So for explaining the same I had put the above code.
 * Hope to get your valuable guidance.
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374492)
 * Ok, so all of that “gunk” above is what you want to show in a code block _within_
   a post? Gotcha.
 * As you’ve noticed, just wedging it in `<code>` tags doesn’t do much for you. 
   There are a few plugins out there that will help though. I use: [http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/](http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/)
 * Only wrinkle is remembering to turn off the wysiwyg editor before inserting code.
   🙂
 *  [ladydelaluna](https://wordpress.org/support/users/ladydelaluna/)
 * (@ladydelaluna)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374508)
 * HS – I think he wants to have that code OUTPUT to the live site… I don’t think
   he’s trying to display the code, but rather thinks that it’s necessary to post
   all that code in the editor to get a page/post.
 * IF that’s the case, jayeshj – the editor is designed for you to just TYPE what
   you want it to say in there – you don’t need to use HTML to build a post/page
   on the site if you’re using wordpress. You just type and hit “publish”.
 *  Thread Starter [jayeshj](https://wordpress.org/support/users/jayeshj/)
 * (@jayeshj)
 * [20 years, 1 month ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374667)
 * Hi HandySolo,
 * Yes you got me exactly.
 * I am trying out the plugin now. Will get back if any further help is required.
 * Thank you a lot all your guidance.
 * ladydelaluna, thank you for the update.
 *  [refnulf](https://wordpress.org/support/users/refnulf/)
 * (@refnulf)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374909)
 * i just decided to post my query to this topic rather than create a new one..
 * is there no-way to post html code? i didn’t really understand much of what was
   said prior so forgive me…
 * for example, i want to post the imeem playlist thingamajig, the code for which
   is:
 * `<object width=\"300\" height=\"290\"><param name=\"movie\" value=\"http://media.
   imeem.com/pl/3Ezbzi7hxO/aus=false/\"></param><param name=\"wmmode\" value=\"transparent\"
   ></param><embed src=\"http://media.imeem.com/pl/3Ezbzi7hxO/aus=false/\" type=\"
   application/x-shockwave-flash\" width=\"300\" height=\"290\" wmode=\"transparent\"
   ></embed></object>`
 * imeem says the wordpress doesn’t actually allow this. that’s a shame.
 * are there any plans for allowing in the near future tho?

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

The topic ‘Posting HTML code in WordPress’ is closed to new replies.

## Tags

 * [content](https://wordpress.org/support/topic-tag/content/)
 * [feature](https://wordpress.org/support/topic-tag/feature/)
 * [html](https://wordpress.org/support/topic-tag/html/)
 * [only](https://wordpress.org/support/topic-tag/only/)
 * [read](https://wordpress.org/support/topic-tag/read/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 5 participants
 * Last reply from: [refnulf](https://wordpress.org/support/users/refnulf/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/posting-html-code-in-wordpress/#post-374909)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
