I’m using the Avia Layout Builder to edit single post layout.
All was fine until I notice the excerpt length of the post on homepage isn’t displaying correctly.
The breaking of the read more tag is displayed wrongly on homepage. And the excerpt is missing on the post slider. What did I do wrong here?
Hey yarac!
It’s because your using the advanced layout editor when writing the post. You’ll need to write a custom excerpt when doing this. If you do not see the excerpt field then click on “Screen Options” in the top right hand corner of your screen and check it to display.
Regards,
Elliott
Ahh ok..but I’d like to have different excerpt length for the post slider and the blog post on homepage respectively. Is there a way to achieve this?
Hi!
Hmm, I can’t think of a way to do that. Would you like to try using some CSS to shorten the excerpt? If so which one would you like to try and shorten?
Best regards,
Elliott
Yep I can try some CSS or even changing some code in the scripts. I’d like to have the blog post longer while the rest shorter, like in image below..
Hey!
Add this to a codeblock element in the page.
<style type = "text/css">
.slide-entry-excerpt {
max-height: 100px;
}
.av-magazine-content.entry-content {
max-height: 100px;
}
</style>
Best regards,
Elliott
It worked! Thanks Elliott!