Where do I add an action hook & callback in my theme?

The best place for you is probably going to be in your Theme’s functions.php file. Navigate to /wp-content/themes/your-theme-name/functions.php. Paste it above/below any of the other code there, making sure to stay between any < ?php or ?> tags.

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