
內容簡介
如果您想要以雜誌或報紙的風格顯示文章,就可以使用這個 WordPress 外掛。您無需更改主題文件或添加樣式,只需要使用「表格」分割器即可。
功能
完全自動分割器;
可以創建表格或 div 的列;
支援標籤;
可以分割長段落和無序列表;
會保留標題文本。
要求
此外掛需要 DOM API (http://www.php.net/manual/en/book.dom.php) 和 Tidy (http://www.php.net/manual/en/book.tidy.php)。
使用方法
使用 [auto_columns]...[/auto_columns] 的短語法來包裹您要分割的文字區塊。它會產生如下的標記:
<div class="auto-columns-container columns-2">
<div class="auto-columns-column column-1 first-column">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>
<div class="auto-columns-column column-2 last-column">Nam tincidunt gravida dui, at bibendum nisl lacinia nec.</div>
<div class="auto-columns-clear"></div>
</div>
在您的佈景主題中使用 do_shortcode 函數:
<?php echo do_shortcode('[auto_columns]' . $content . '[/auto_columns]'); ?>
當然,您需要在主題中定義 .auto-columns-column 類別的寬度。
外掛標籤
開發者團隊
原文外掛簡介
You need to display your articles in magazine or newspaper style. Use this plugin. You don’t have
to change your theme files or add styles – just use “table” splitter.
Features
fully automatic splitter;
create columns in table or div’s;
tag-aware;
splits long paragraphs and unordered lists;
keeps text with headers;
Requirements
The plugin requires DOM API (http://www.php.net/manual/en/book.dom.php) and Tidy (http://www.php.net/manual/en/book.tidy.php)
Usage
Wrap block of text with [auto_columns]...[/auto_columns] shortcode. It will produce markup like
In your theme use do_shortcode function:
You will have to define width for .auto-columns-column class in your theme, of course.
