Customizing WordPress the_title with add_filter
The issue is that you are mixing up the $title variables. $title is the parameter passed to the new_title function, but then you use it as an array: $title[‘custom_version’]. Try this: add_filter(‘the_title’, ‘new_title’, 10, 2); function new_title($title, $id) { if(‘custom_version’ == get_post_type($id)) $title=”Application has been updated to v”.$title; return $title; } I’d also highly recommend … Read more