Need alternative get_posts function for custom post type

The default value for the parameter post_type is post. To get posts from your custom post type specify the post_type parameter accordingly. More information about the usage of get_posts() is available at the related codex page.

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