Balkhis - Vision For Success

Displaying Raw Codes in WordPress

Dear Readers, I would like to thank you for reading this post. I highly value your feedback and would like to know more about my readers. Follow me on Twitter

This one problem has been a pain for ages. I cannot display raw codes in wordpress. Raw Codes meaning php, html or anything of that sort. Now don’t tell me there is a plugin called Raw Code because I already tried that. It didn’t work. I tried multiple tutorials with the code where you will the Code tag and have different values. It didn’t work.

How the heck would I display Raw Codes in WordPress especially because I post alot of tutorials that include html and php. Well, I was talking to a good friend of mine Steve over the msn. He told me the trick that he have been using. I tried that and it worked like a charm.

Well this is no plugin. It is simply encoding your html and php tags. Pretty darn simple and easy.

First Go to this site to Encode your Html

Than Copy and Paste the html codes there and click Encode.

Then make this pre-tags

<pre class="alt2" style="margin: 0px; padding: 6px; border: 1px inset; width: 440px; height: 50px; text-align: left; overflow: auto;"> </pre>

In between these tags add your encoded codes and It should work.

I thought I should share this with those who don’t know how to do this because It really helps alot.



To stay updated with the blog, please consider subscribing to my full feed RSS. You can also subscribe by Email and have new posts sent directly to your inbox. I hate spam as well, so I promise you that you will not be spammed.
Add to Social Bookmarks:
Add this Article to Digg Add this Article to Stumbleupon Add this Article to Del.icio.us Add this Article to Reddit Add this Article to Newsvine Add this Article to Technorati

RSS feed

6 Comments

Comment by Chetan
2008-03-31 23:08:48

Nice tutorial.. I have had the problem with posting codes earlier till i read this kind of topic somewhere else too. :)


Comment by Enkay Blog
2008-06-18 17:00:45

I had the same problem earlier and WordPress would just process the code. I did notice a “code” button in some of the newer versions of WordPress that could help with that too.


 
 
Comment by Angad Sodhi
2008-06-17 13:53:37

This is the first time I’m hearing of such a thing. Thanks. I’ve bookmarked it right away!


Comment by Syed Balkhi
2008-06-17 16:47:22

Yeah if you ever write a tutorial or need to display codes in your post this is what you need to do otherwise it can mess up your site.


 
 
Comment by Rakhshinda
2008-06-18 13:35:38

Its good that you have posted this i might encounter this prbolem later on, thanks syed.


 
Comment by Enkay Blog
2008-06-18 16:58:27

Thanks for this tip. I will definitely give it a shot! :)


 

Sorry, the comment form is closed at this time.

Subscribe to Balkhis via RSS
Subscribe to Balkhis via Email Pimp My Blog