List all content by post type

Instead of using get_pages use

new WP_Query($args)

It will get all the posts/pages/attachments

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