Help > Forum > テーマと外観 > 支柱の高さを制限する

支柱の高さを制限する

以下の手順に従って、支柱の高さを制限することができます。ユーザーは「詳細を読む」リンクをクリックして、身長が制限されている投稿を展開できます。

  1. Web サイト Toolbox アカウントにログインします。
  2. をクリックします。 統合する リンク。
  3. 内にある 統合する メニューで、 HTML リンク。
  4. 次のコードを フォーラムヘッドタグ 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>
  5. 保存 変化します。


If you still need help, please contact us.