BlogSpot, Internet Resource

How to put codes in wordpress without plugin

How to put codes in the wordpress content?
When you put some php, java codes in the wordpress content, they will appear not correctly after you have published them, then, how to put codes in the content?
Here is an easy way.
Just like these

<script type=”text/javascript”>
var s=”";

<?php if (count($posts) >= 3) { ?>

When you want put codes in wordpress, you should change the < to &lt; , if you use the &lt;  , then the codes will not work.  

just change the < to &lt;
this method also works well in blogger, if you want to put adsense codes in blogger content, say wrap adsense ads in between blogger post content
following the steps: (this method is coming from

  1. Login to Blogger account.
  2. At Blogger Dashboard, click on Settings link listed behind “Manage” for the blog that you want to enable to show AdSense ads between posts.
  3. Click on Template tab, and then click on Edit HTML sub-tab link to open Blogger HTML code template editor to edit the contents of your template.

Blogger Edit HTML

  1. a copy of your template by click on Download Full Template link, in case it’s is needed be uploaded to Blogger server to recover the template in the event of mistake or corruption.
    Blogger Download Full Template
  2. Click to tick the Expand Widget Templates checkbox.
    Blogger Expand Widget Templates
  3. Seach for the following line in the new Blogger template HTML code in the text box:<data:post.body/>or<p><data:post.body/></p>
  4. Append the following lines of code into the template BEFORE the line of <data:post.body/> located above:

    Parsed Google AdSense Ad Code (guide to
    parse the HTML code of AdSense JavaScript with escape character)

    AdSense Ad Code in Blogger Template

    Note the above code will align AdSense ad block to the left. You can also make it make it float to the right, but change the “float: left;” to “float: right;”.

    Note that you can also make the ads appear only on single post view.

  5. Click on SAVE TEMPLATE button when done.

If the alignment of your blog layout is not good, you can try to add the code above directly after the following line in the Blogger widget template:

<div class=’post-header-line-1?/>

The above trick may work to add ad code wrap beside the post content in Blogger from other advertising networks too, such as AdBrite, BlogAds, Chitika, Tribal Fusion, ValueClick, and etc, in case you can’t use AdSense for reason such as account banned.