Category archive in with conjunction with custom post type is empty

WordPress only includes the post post type for Category archives by default, but you can add additional post types by altering the query:

function wpse241719_add_custom_types_to_category_archives( $query ) {
    if ( ! is_admin() && is_category() && $query->is_main_query() ) {
        $query->set( 'post_type', array(
                         'post',
                         'work',
                         // 'another_post_type',
                    ) );
    }
}
add_filter( 'pre_get_posts', 'wpse241719_add_custom_types_to_category_archives' );

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