How to hide something from custom home page with php code?

Try

!is_front_page()

Or

is_front_page()

But it depends on what the function is.

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