Line break in Post Title
-
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:
<script type=”text/javascript”>
jQuery(document).ready(function($){
$(‘select[name=”item_meta[208]”], select[name=”item_meta[209]”]’).change(function(){
var val1 = $(“select[name=’item_meta[208]’]”).val();
var val2 = $(“select[name=’item_meta[209]’]”).val();
{$(“#field_x5476m”).val(val1+’ \n ‘+val2);}
});
});
</script>You can see the result her (in the trial with name of a library/name of librarian instead of name/date):
http://www.animatinglibraries.com/wordpress/?page_id=381
It 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’t find a way to put a deliberate line break.
I 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!
The topic ‘Line break in Post Title’ is closed to new replies.