Ignores post_type when no results

Use get_query_var( 'post_type' ) instead of get_post_type().

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