Balkhis - Vision for success

Displaying Raw Codes in Wordpress

 Mar 30, 2008  Syed Balkhi  For Starters  

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.

RSS feed | Trackback URI

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! :)


 
Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.


Hey, I am Syed Balkhi, The guy who is behind Balkhis Inc. I entered the industry back in 2002 not knowing a single thing. I barely spoke english at that time. In the past six years, my language barrier has been eliminated. Aside from English, now I also speak html, and php. Along with the languages I have also managed to master a few arts. Art of web-designing started when I first entered. Messing around with photoshop, I learned how to create my first web design. Now I founded a web designing firm Uzzz Productions. After running numerous amount of websites in various niche, I have mastered the art of web-development. Now I am compiling a resource of what I already know, and what I am learning on this blog. This resource is to help me if I ever need a guide to look back to, and it is help my fellow webmasters.

Read more about Syed Balkhi