Get posts associated with custom taxonomy alternate way

The link you added in your question is for Displaying the other post that share the same TERM.

And I guess you want to display the all post for the current taxonomy not the single term ?

Then just used the default $wp_query to do it just remove the custom wp_query and keep the loop same.

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