內容簡介
這個外掛可以將分類顯示為一個連結列表或下拉式跳轉菜單(選擇後自動跳轉到頁面)。
它還包括高級選項,可以更改分類法、顯示文章計數和分類層次結構、更改顯示順序、添加CSS樣式以及修改標題。
它會取代內置的「分類」小工具(WP_Widget_Categories)。
可以使用 hook 來過濾標題:dmg_categories_widget_title。
例如,要在單個頁面或文章上更改標題,可以將以下內容添加到 functions.php 文件中:
function myTitleFilter( $title ) { if( is_singular() ) { return "<strong>$title</strong>"; } else { return $title;
} } add_filter( 'dmg_categories_widget_title' , 'myTitleFilter');
有關此外掛的更多信息,請查看http://dancoded.com/wordpress-plugins/categories-widget/。
外掛標籤
開發者團隊
原文外掛簡介
Display categories as a list of links or a dropdown jump-menu (automatically navigate to page when selected).
Includes advanced options to change the taxonomy, display post counts and the category hierarchy, change how they are ordered, add CSS styles and modify the title.
Replaces the built in Categories Widget (WP_Widget_Categories).
A hook is available to filter the title: dmg_categories_widget_title.
For example, to change the title on a single page or post, you could add this to your functions.php file:
function myTitleFilter( $title ) { if( is_singular() ) { return "$title"; } else { return $title;
} } add_filter( 'dmg_categories_widget_title' , 'myTitleFilter');
More information about this plugin can be found at http://dancoded.com/wordpress-plugins/categories-widget/.
