WordPress plugin intelligence profile

Parentless Categories

Provides a template tag like the_category() to list categories assigned to a post except those that have a child category also assigned to the post.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 6.8
Current version2.3.1
WordPress coverageTested up to WordPress 6.8
Minimum stackWP 4.6 · PHP —
Directory statusactive
Last directory update21 Apr 20251y ago
Active installations10Adoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Parentless Categories version 2.3.1 as active, updated 1y ago and tested up to WordPress 6.8.

Overview

About this plugin

This plugin provides a template tag which acts as a modified version of WordPress’s built-in template tag, the_category(). the_category() lists all categories directly assigned to the specified post. c2c_parentless_categories() lists those categories, except for categories that are parents to other assigned categories.

For example, assume your category structure is hierarchical and looks like this:

Vegetables |-- Leafy | |-- Broccoli | |-- Bok Choy | |-- Celery |-- Fruiting | |-- Bell Pepper | |-- Cucumber | |-- Pumpkin |-- Podded | |-- Chickpea | |-- Lentil | |-- Soybean

If you directly assigned the categories “Fruiting”, “Cucumber”, and “Pumpkin” to a post, c2c_parentless_categories() would return a list that consists of: “Cucumber”, and “Pumpkin”. Notice that since “Fruiting” was a parent to a directly assigned category, it is not included in the list.

By default, categories are listed as an HTML list. g. >.

As with categories listed via the_category(), categories that are listed are presented as links to the respective category’s archive page.

Example usage (based on preceding example):

  • <?php c2c_parentless_categories();?>

Outputs something like:

com/category/fruiting/pumpkin">Pumpkin</a></li></ul>

  • <?php c2c_parentless_categories( ',' );?></ul>

Outputs something like:

com/category/fruiting/pumpkin">Pumpkin</a>

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Developer Documentation

md. That documentation covers the template tags and hooks provided by the plugin.

As an overview, these are the template tags provided by the plugin:

  • c2c_parentless_categories(): Outputs the parentless categories.
  • c2c_get_parentless_categories_list(): Returns the list of parentless categories.
  • c2c_get_parentless_categories(): Returns the list of parentless categories for the specified post.

These are the hooks provided by the plugin:

  • c2c_parentless_categories (action), c2c_get_parentless_categories_list, c2c_get_parentless_categories (filters):

Allows for an alternative approach to safely invoke each of the identically named functions in such a way that if the plugin were deactivated or deleted, then your calls to the functions won’t cause errors on your site.

  • c2c_parentless_categories_list (filter):

Customizes the return value of the c2c_parentless_categories_list() function.

  • c2c_get_parentless_categories_omit_ancestors (filter):

Customizes the function argument indicating if ancestor categories of all directly assigned categories (even if directly assigned themselves) should be omitted from the return list of categories.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • the category
  • categories
  • coffee2code
  • list
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 6.8

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 6.8.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to6.8
Minimum requirementsWordPress 4.6 · PHP not listed
Update activity21 Apr 20251y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.