您可以使用以下说明来限制帖子的高度。用户可以单击 “阅读更多” 链接来扩展高度受限的帖子。
- 登录您的Website Toolbox账户。
- 点击 整合 主菜单中的链接。
- 点击 自定义代码 链接。
- 将以下代码插入到 论坛头标记 HTML 代码 文本框:
<script> window.addEventListener('load', (event) => { if (jQ(".wt-post-listing").length) { jQ(".post-body-content").each(function(){ if (jQ(this).children("[id^='post_message_']").outerHeight() > 300) { jQ(this).children("[id^='post_message_']").addClass('read-more-enabled').after('<a class="cleared text-block custom-read-more-link"><i>Read more âº</i></a>'); } }); jQ(".custom-read-more-link").click(function(){ jQ(this).addClass('hidden').prev('.read-more-enabled').removeClass('read-more-enabled'); }); } }); </script> <style> .wt-post-listing .post-body-content > [id^='post_message_'] { float: left; width: 100%; } .wt-post-listing .post-body-content > [id^='post_message_'].read-more-enabled { max-height: 300px; overflow: hidden; } </style> - 保存 这些变化。