I want to add some words "[Rock]" before the tittle in specific category (rock). I have that function:
But when i add this to function.php I getting blank page on my site, what is wrong with this code?
Thanks for support.
Code:
function suppress_if_Rock($title, $id) {
if (in_category('Rock', $id)) {
return '[Rock] '.$title;
}
return $title;
}
add_filter('the_title', 'suppress_if_Rock', 10, 2);
But when i add this to function.php I getting blank page on my site, what is wrong with this code?
Thanks for support.