How to show CPTs in term archive

You can use pre_get_posts hook to modify the main query, or any WP_Query for that matter. For example like this,

add_action(
    'pre_get_posts',
    function($query) {
        // target only public category main query
        if (
            is_admin() ||
            ! $query->is_main_query() ||
            ! is_category()
        ) {
            return;
        }

        // include custom post type in the query
        $query->set( 'post_type', array( 'post', 'story' ) );
    }
);

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