Break post title in 2 lines

Posted in: Newspaper
Post count: 11

Hi,

I have a client who wants to break a long post title into 2 lines. If I use the tag <br> inside the post title, I can achieve the result in the article page but not on the blocks on the homepage.

Can you assist me on how to solve this?

Post count: 20688

Hi,

The post title on modules will be broken in as many lines as necessary given the available space and module, if it is longer
https://www.screencast.com/t/kqmTvyymI6Y
The display of article titles on blocks and modules is an automatic process. The length of the title can be controlled for each module in the excerpt settings
https://www.screencast.com/t/rUaVMLTmC

Thanks

Post count: 11

Hi Simion,

Thank you for the reply.

I am aware that the title will break given the available space and module, but my question is if I can make it manually. For e.g. if my post title is “Sentence 1. <br> Sentence 2.” it will be shown on the module as:
Sentence 1.
Sentence 2.

Post count: 20688

Hi,

There could be a way, but you would have to modify the post templates that you use, and the module files as well. Try something like this example for the default post template
https://www.screencast.com/t/N72EzRfHc7e
https://www.screencast.com/t/y2AkFw7sA
https://www.screencast.com/t/o9KZsfRDM
And like this for the module 2 for example
https://www.screencast.com/t/JK6mINLoXt
https://www.screencast.com/t/6IsjdcavDMB6
You could make some further tests to see if this works properly.

Thanks

Post count: 11

Thank you Simion!

Worked like charm!

Post count: 24

Hi,

I would like to break a page title into 2 lines.(Not for long sentence.)
I found how to do it in this forum, but it was for “post title”.
https://forum.tagdiv.com/topic/break-post-title-in-2-lines/

And also, if it’s possible, I would like to use different font-size of page titles as below;
Title1(h1)
Title2(h2)

Could you assist me?

Post count: 20688

Hi,

I believe there are plugins that you ca use to split the page titles, like this one for example in this tutorial
http://www.wpbeginner.com/plugins/how-to-split-post-or-page-title-in-wordpress/
The heading is set as a whole for the page title in this file, I believe it is according to SEO rules in the page template file
https://www.screencast.com/t/OQ5ItojMV

Thanks

Post count: 24

It worked!

Thank you.

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.