have_posts is empty on category.php

OK, it turns out that a simple function on the pre_get_posts filter does the trick. The issue was that custom post types aren’t included in the default query.

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