Custom Field is getting the value of another page/post instead of the current one?

You are doing something wrong.

First of all, do a var_dump(__FILE__); to make sure you’re in the template you expect.

If that doesn’t clear the mist, post the entire template, for context.

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