Hi @pampril,
To get the result as you desired, you must activate the child theme. You can get knowledge about child theme and download the accelerate child theme from below link.
https://themegrill.com/blog/tutorial-creating-wordpress-child-theme/
Now that you’ve downloaded and activated the child theme, add the below code in functions.php.
function flash_title_trim_words( $title )
{
if( !is_single() ) {
// limit to five words
return wp_trim_words( $title, 5, '...' );
} else {
return $title;
}
}
add_filter( 'the_title', 'flash_title_trim_words' );
What it does is, it will limit the title words to 5 trailing with … but in inner page it will show full title.
The process is tedious and I’ll advise you to attempt this only if you are confident enough and have a decent knowledge about coding.
Thanks and Regards,
Milan.
Hi @rubick322,
Thanks a lot for your help! Nevertheless I’ve done everything you suggested and I still get the same problem.
As you can see now, on line 1, the title of the 3rd post is made of several short words: consequently, the 5 words stand on 1 line only.
I have other titles that naturally fit 1 line.
I’ve tried to reduce titles to 4 words instead of 5, but they don’t really make sense anymore. Moreover, for line 1, column no.2, I still have 2 lines with 4 words.
Isn’t there a way to ask the following line to show, even when the columns are not aligned?
Hi @pampril,
Please add the following CSS:
.blog-wrapper.tg-column-wrapper {
display: flex;
margin-left: -1rem;
flex-flow: row wrap;
}
Help link https://docs.themegrill.com/knowledgebase/where-do-i-add-my-custom-css/
This should do the trick and if you want, you can revert the previous changes you made. I believe after adding above CSS there won’t be such problem regardless the title length.
Thanks and Regards,
Milan
Working perfectly!!
Thanks a lot for your help!
Hi @pampril,
Great to hear it worked for you, if you liked our theme and enjoying the support we would be thrilled if you drop a review. Your review would be an enormous help. And if you ever have a query please let us know.
Thanks and Regards,
Milan.