Pages Navigation Menu

a pixelated personality

Split Name WordPress Function

Split Name WordPress Function

Recently I ran into a road block when working on a website where I needed to take the names of gourmet chef’s, add them as the page title, then display them split onto two lines. I thought CSS word-break might bail me out, but no joy; was not working for my situation. I then Googled for solutions and found a StackOverflow post that suggested CSS word-spacing. That failed miserably as well. The solutions was to code a WordPress function then apply it to where I was echoing out the titles.

Here is a look at my template code: