How to add sidebar to homepage programmatically?

Can you send a the code of the pages the sidebar is showing?

But it should normally be before the get_footer() function

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