How to add a custom filter (by coding) before access one wordpress page ? And where to call the custom filter?

How to add a custom filter (by coding) before access one wordpress page ? And where to call the custom filter?

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