is there away to hide php code in wordpress not to show in PAGES

Finally Working.

I used this

if (is_singular('post')) {

    // your code after this line or comment

}