[Resolved] How to split a long heading into 2 lines

Home Forums Support [Resolved] How to split a long heading into 2 lines

Home Forums Support How to split a long heading into 2 lines

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #2352184
    Tunyar

    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.

    #2352687
    Ying
    Staff
    Customer Support

    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?

    #2353514
    Tunyar

    Hi Ying, I’m using Avery template. So, I believe that the heading is built with a heading block.

    #2353635
    Fernando
    Customer Support

    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

    #2354768
    Tunyar

    Yes, sure. How can we break a long headline (2 phrases) into 2 lines?

    #2354781
    Fernando
    Customer Support

    Thank you.

    It already wraps by default if exceeds the available width. How would you like it to appear? Can you share a sketch?

    #2354831
    Tunyar

    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.

    #2354848
    Fernando
    Customer Support

    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.

    #2355703
    Tunyar

    Thanks Fernando.

    #2355923
    Fernando
    Customer Support

    You’re welcome Tunyar!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.