is_home() and is_front_page() not working in sidebar

I was having the same issue but found an anwser that worked for me. When you use wp_reset_query(); before you use is_home(); or is_front_page(); it will work just fine.

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