How to use in_category?

It looks like you’re mixing the WordPress in_category() function with plugin / theme code that isn’t setting up a standard WP Query or post object. So you can’t use in_category().

Use var_dump($content); and var_dump($data); to see if either of those objects have a ‘category’ property for the content. Use that in an if statement instead, e.g.: if($data->category-id == 26)