Get the title before comma

Use strtok():

return strtok( get_the_title(), ',' );

You could also use my function utf8_truncate(). This is a little bit more flexible and it can handle long strings without a comma.

Leave a Comment