{"id":3917856,"date":"2013-07-10T12:21:52","date_gmt":"2013-07-10T12:21:52","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/line-break-in-post-title\/"},"modified":"2016-08-21T02:48:20","modified_gmt":"2016-08-21T02:48:20","slug":"line-break-in-post-title","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/line-break-in-post-title\/","title":{"rendered":"Line break in Post Title"},"content":{"rendered":"<p>Hello, I am trying to put a line break into a post title. For the title, I use a field that is an aggregate from two other fields created from input through a Formidable Pro plugin form. The first field allows the users to add a name, the second a date. A third field is populated by the aggregate of these two fields. After much trial and error and salient advice I managed to put in a line break, using this code:<\/p>\n<p>&lt;script type=&#8221;text\/javascript&#8221;&gt;<br \/>\njQuery(document).ready(function($){<br \/>\n$(&#8216;select[name=&#8221;item_meta[208]&#8221;], select[name=&#8221;item_meta[209]&#8221;]&#8217;).change(function(){<br \/>\nvar val1 = $(&#8220;select[name=&#8217;item_meta[208]&#8217;]&#8221;).val();<br \/>\nvar val2 = $(&#8220;select[name=&#8217;item_meta[209]&#8217;]&#8221;).val();<br \/>\n{$(&#8220;#field_x5476m&#8221;).val(val1+&#8217; \\n &#8216;+val2);}<br \/>\n});<br \/>\n});<br \/>\n&lt;\/script&gt;<\/p>\n<p>You can see the result her (in the trial with name of a library\/name of librarian instead of name\/date):<br \/>\n<a href=\"http:\/\/www.animatinglibraries.com\/wordpress\/?page_id=381\">http:\/\/www.animatinglibraries.com\/wordpress\/?page_id=381<br \/>\n<\/a><br \/>\nIt works perfectly when I add the field into the post: Name and date are indeed on two lines. But when I use this same aggregate field as the post title, the line break is always stripped out. Long titles spill onto a second line, but I can&#8217;t find a way to put a deliberate line break.<br \/>\nI would be grateful for any advice or suggestions. The ability to have split-line headers would be very useful in many ways I think. Thank you for your help and ideas!<\/p>\n","protected":false},"template":"","class_list":["post-3917856","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3917856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3917856\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3917856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}