Query custom posts from custom taxonomy

You should access global variables in php using global keyword.It makes variable( or object, array) visible inside current function we are dealing with. In function wms_output_home_slides you are using $post global variable directly instead access it using global keyword as following.

function wms_output_home_slides($cat) { // $cat="homeslide"
global $post;
// You Code Goes here
}

Find more information on this page.

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