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

}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)