Apply wordpress filter checking category

Thanks for the response David. I found the solution. I added the following code in functions.php

add_filter('get_the_excerpt', 'process_excerpt');

function process_excerpt($param) {
    global $post;
    if(in_category('MY-CATEGORY-SLUG',$post))
        return 'adding some data'.$param;
    else
        return $param;
}

This fixed my issue.

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