Archived topic
How to split a long heading into 2 lines
9 replies · Started by Tunyar on September 23, 2022
Hi, is it possible to the heading into two lines? For example, I have a long heading like this ==> "xxxxxxxxx 2022: yyyyyyyyy". I'd like to move the y section to a second line. Thanks.
Hi there,
Is this heading built with a headline or heading block?
If not, can you link me to the page and point me to the headline?
Hi Ying, I'm using Avery template. So, I believe that the heading is built with a heading block.
Hi Tunyar,
Can you share the link to the specific page in question? Can you also point us where we can see the Headline?
You may use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Yes, sure. How can we break a long headline (2 phrases) into 2 lines?
Thank you.
It already wraps by default if exceeds the available width. How would you like it to appear? Can you share a sketch?
I want the first part of the title to be centred and appear in the first line and the second part in the second line. Is this possible? Thanks.
That would be possible but you'll need custom code.
One approach is to create a custom field with the help of ACF: https://www.advancedcustomfields.com/resources/getting-started-with-acf/
You'll need to add a "subtitle" field for your posts. Then, manually move the "second part" of your title to that field.
Then, go to Appearance > Elements > Global Posts Headers, and add a GB Headline Block. Enable its Dynamic Data and set the source to post meta - and set your custom field.
This should assure that there's a definite first and second part for your titles.
Thanks Fernando.
You're welcome Tunyar!