Category Creator Journey

Go behind the scenes.

Creator Journey explores the experiments, tools and lessons behind creating, building and learning. From AI and websites to video production and automation, follow the practical journey behind the finished work.

How to Shorten WordPress Post Titles & Excerpts to 3 Lines

这次视频我想分享一个我在自己架网站时遇到的小问题 我最近在自学架构自己的网站。 真正开始动手以后,才发现网站背后有很多术语、CSS、coding……而这些东西,刚开始接触的时候真的不容易。 很多时候,我知道自己想解决什么问题,却不知道应该用什么关键词去搜索答案。 这也让我花了不少时间踩坑、测试和研究。 这次遇到的问题,是我使用 WordPress + Blocksy Advanced Posts 来显示相关文章列表时,发现每篇文章的 Title(标题)和 Description / Excerpt(摘要)长度都不一样。 有些标题比较短,有些标题比较长;摘要(Excerpt)也是一样。这样一来,每个文章预览的高度就不一致,整个页面看起来会有点凌乱。 其实我想要的效果很简单:让文章的 Title 和 Excerpt 都限制在固定的行数。 这样一来,文章预览的高度比较一致,整个页面看起来也会整齐很多。 在这个视频里,我会分享我是怎么解决这个问题的: 👇👇Additional CSS Class 给需要调整的 Block 加上这个 Class: short-excerpt 👇👇CSS Snippets 1. 限制 Excerpt 为 3 行…

Read MoreHow to Shorten WordPress Post Titles & Excerpts to 3 Lines