Sub Categories Widget

描述

Sometimes when you divide up your WordPress content into categories it all ends up in sub-categories of one or two main categories that don’t have any content themselves.

With the widget you can add a list of sub-categories even if the parent doesn’t have posts.

You can display and filter sub-categories in various ways:

  • Use the parent category as the widget title
  • Show post counts in bracket next to the name
  • Hide empty sub-categories
  • Add a link to the parent category to the widget title
  • Show the full sub-category tree so it include sub-sub categories and so on as well
  • Display the list as dropdown rather than as links
  • Use the first category of the current post as the parent
  • Exclude one or more sub-categories from the list
  • List the categories in reverse order

安装

Installing is pretty easy and takes only a minute or two:

  1. Upload ‘sub-category-widget’ directory to your ‘/wp-content/plugins/’ directory.

  2. Activate the plugin through the ‘Plugins’ screen in WordPress.

  3. On the ‘Widgets’ sub-menu of ‘Appearance’ you will find a new widget type called ‘Sub Category’.

  4. Add one or more of these to your themes widget display areas.

  5. For each widget you add, decide what and how you’d like it to display.

  6. Save your settings.

评价

2022年7月25日
Simple, straightforward. When used in conjuction with Widget Options, it allows me to display subcategories on static pages dynamically.
2017年8月23日 1 回复
I tried several solutions before this one but none worked as well Sub Categories Widget. Many thanks and kudos to you my man, thank you, will donate once I'll start monetize and let me know when you're around Berlin and I'll show you around!
阅读所有19条评价

贡献者及开发者

“Sub Categories Widget” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

“Sub Categories Widget”插件已被翻译至1种本地话语言。 感谢所有译者为本插件所做的贡献。

将“Sub Categories Widget”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

1.5.2

  • Changed dropdown url function from get_option to get_home_url for compatibility with WPML

1.5.1

  • Fixed issue with a php7.2 depreciation during plugin activation (bug fix)

1.5

  • Added an option to display the categories in reverse order
  • Added the ability to change the selection label text of the dropdown list

1.4.1

  • Fixed missing parent category notice on pages when using irst category of the post option

1.4

  • Added an option to use the first category of the post as the parent
  • Improved and updated sanitation and validation

1.3.01

  • Updated the dropdown to be in name order (to match the list)

1.3

  • Added option to show as dropdown list
  • Tidy of widget options area

1.2

  • Added ability to exclude categories (with a comma delimited list)
  • Added option to show the entire sub-category tree rather than just one level

1.1

  • Highlights the current category if on a category archive page (use .current-cat to style)

1.0

  • First Production Release

0.1

  • Initial Release