WP-dTree - 樹枝狀目錄
->
無意間發現這個好用的 plugin,最近在設計新的 Theme 發現用 CSS 寫樹枝狀的分類目錄也是要花點時間來設計,剛好這個 WP-dTree 非常方便的可以產生這樣的效果,該效果就是本站的 Category 的模式。
該 plugin 提供後台設定各項顯示,像是標題的顯示、字數的限制、CSS的設定等等,當然也可以安裝另一個 plugin 來輔助呈現更好的效果。
首先請先到 http://www.silpstream.com/blog/wp-dtree/ 下載 WP-dTree 最新版本為 2.2 版
1. 解壓縮到 wp-content/plugin 底下
2. 到後台啟動 WP-dTree 外掛
3. 呈現樹枝狀目錄的方法,修改 sidebar.php 或者其他檔案
Displaying archives: 顯示文章
<?php
if (function_exists('silpstream_wp_dtree_get_archives')) {
silpstream_wp_dtree_get_archives();
}
?>
if (function_exists('silpstream_wp_dtree_get_archives')) {
silpstream_wp_dtree_get_archives();
}
?>
Displaying categories: 顯示目錄
<?php
if (function_exists('silpstream_wp_dtree_get_categories')) {
silpstream_wp_dtree_get_categories();
}
?>
if (function_exists('silpstream_wp_dtree_get_categories')) {
silpstream_wp_dtree_get_categories();
}
?>
Displaying pages: 顯示頁面
<?php
if (function_exists('silpstream_wp_dtree_get_pages')) {
silpstream_wp_dtree_get_pages();
}
?>
if (function_exists('silpstream_wp_dtree_get_pages')) {
silpstream_wp_dtree_get_pages();
}
?>
4. 再到後台 外觀 -> WP-dTree 做進一步的設定
目前沒有中文化的內容,所以要自己研究囉。
等有空再來翻譯好了 @_@
Exclude Category - 省略目錄
Hide empty categories - 隱藏空白目錄
七月 23rd, 2007 at 11:07 下午
目前是下拉式選單,wordpress widgets 內建的功能。
七月 23rd, 2007 at 9:31 下午
請問一下你的選單式分類是何種plugin?
看起來滿讚的
二月 27th, 2007 at 1:21 下午
所以多謝ED的分享啊:)
二月 27th, 2007 at 11:53 上午
沒有啦,我也是從失敗中學到的 @_@
二月 27th, 2007 at 11:50 上午
還是ED厲害XD
OK囉:)
二月 27th, 2007 at 8:06 上午
修改後台的 Characters to display
它是顯示字串的長度,一個中文字要兩個字元
所以要顯示八個中文字就要改成 16
以此類推 ^_^ 應該可以解決這問題