Adding paged query to custom URL rewrite

I would say you need to add the following rewrite rule in your foreach loop:

add_rewrite_rule('^'.$pt_slug.'/category/(.+?)/page/?([0-9]{1,})/?','index.php?post_type=".$post_type."&category_name=$matches[1]&paged=$matches[2]','top');

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