
內容簡介
你曾經有需要新增網頁內容區塊卻沒有必要加入 div 或者編輯主題檔案或使用 widget 嗎?你是 WordPress 新手,對於前面那句話毫不理解嗎?不用害怕,現在有 Blocky! 插件可以解決這個問題。
Blocky! 允許你在文章和頁面內容中新增一個新的區塊,不需要了解任何網頁代碼。只需單擊「新增內容區塊」按鈕並開始輸入。Blocky! 帶有一個全新的所見即所得編輯器,讓你可以像編輯主要文章內容那樣添加更多內容。想要更改其它內容區塊的佈局嗎?只需為你的內容區塊添加類別並使用你的樣式表進行設定。不想將內容包裝在 div 中嗎?只需在設定頁面中進行編輯。你只想在特定文章類型中啟用 Blocky! 嗎?你可以在設定頁面中選擇啟用哪些文章類型的 Blocky!。Blocky! 還擷取了所見即所得編輯器的當前設置,這意味著即使你使用延伸編輯器功能的插件(例如 TinyMCE Advanced),你的 Blocky! 編輯器與內容編輯器一致。
對於更高級的用法,使用 get_additional_content($postID); 將 Blocky! 的其他內容作為一個多維數組返回,每個區塊都包含一個包含類別和內容的數組。更多詳細信息請參見「其他備註」。
如果你喜歡這個插件,請花些時間撰寫一個評論。
高級用法
若要在不使用內容篩選器的情況下使用 Blocky!,使用以下模板:
將 <?php the_content();?> 替換為 <?php echo do_shortcode( get_the_content() );?>
在你想要顯示其他內容的位置添加此代碼
<?php $additional_content = get_additional_content();
for( $i = 0; $i < count($additional_content); $i++ ) {
echo $additional_content[$i]['content'];
}?>
外掛標籤
開發者團隊
② 後台搜尋「Blocky! – Additional Content Blocks」→ 直接安裝(推薦)
原文外掛簡介
Have ever encountered the need to add new sections to your page content without needing to add divs to your content, editing your theme files or using a widget? Are you a WordPress novice and have no idea what that previous sentance means? Fear no longer – Blocky! is here.
Blocky! allows you to add a new section to the content of your posts and pages without needing to know any web coding. Simply click on the “Add New Content Section” button and get typing. Blocky! brings in a new WYSIWYG editor, allowing you to add more content the same way you would with your main post content. Want to change the layout of your additional content sections? Simply add classes to your content section and use your stylesheet to do the rest. Would you rather not wrap your content in a div? Simply edit it in the settings page. Only want to use Blocky! on select post types? You can choose which post types to enable Blocky! from the settings page. Blocky! also grabs the current setting for the WYSIWYG editors, meaning that your Blocky! editors are consistent with the content editors even if you are using a plugin such as TinyMCE Advanced that extends the capabilities of the editor.
For more advanced uses, use the get_additional_content( $postID ); to return Blocky!’s additional content as a multidimensional array with each section containing an array with both the class and the content. See “Other Notes” for more details.
If you like the plugin, please take the time to leave a review.
Advanced Use Case
To use Blocky! without the content filter, use this template
Replace with
Where you want your additional content to display, add this code
