Help

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

支柱の高さを制限する

以下の手順に従って、支柱の高さを制限できます。ユーザーは「続きを読む」リンクをクリックして、高さが制限されている投稿を拡大できます。

  1. Website Toolboxアカウントにログインします。
  2. をクリックします 統合 メインメニューのリンク。
  3. をクリックします カスタムコード リンク。
  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.