Did you check the break tag on front end output? (Flushing any caches to eliminate stale data) In its default state, WP displays break tags in the back end so they can be edited. Then on the front end they are honored as HTML and the title breaks where encountered. Themes or plugins can alter this behavior, so it’s not a given.
The best solution is to undo whatever code is changing default behavior. It’s a matter of identifying the modifying hook and removing it after it is added. Tracking down that code can be a needle in haystack search.
Replacing a pipe char with a break tag isn’t a bad idea. Along the same line but better is to replace what became of the break tag with an actual break tag. It probably became & lt;br& gt;
(without the spaces). Use str_replace() to find such occurrences and replace with the actual tag. This can be done right on the template, replacing the_title();
with $title = get_the_title();
. Then do str_replace() on $title before echoing out.
There may be several templates on which this is required. It may be easier to hook “the_title” filter and do the str_replace() there. Then your code will be applied to all occurrences of the_title() regardless of template.
Instead of doing str_replace(), you could probably use html_entity_decode() since the breaks were likely converted by use of htmlentities(). This would undo all entity conversions, not just breaks. This may or may not be desirable.