code block does not show in excerpt

Try getting it in raw form from the DB:

global $wpdb;
$post_excerpt = $wpdb->get_var(
        $wpdb->prepare(
            "SELECT post_excerpt FROM $wpdb->posts
             WHERE ID = %d
            ",
            $post->ID
        )
    );

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