WordPress plugin intelligence profile

Peer Categories

List the categories that are peer (i.e. share the same category parent) to all lowest-level assigned categories for the specified 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 Peer 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 a modified version of WordPress’s built-in template tag, the_category(). the_category() lists all categories directly assigned to the specified post. c2c_peer_categories() lists those categories PLUS any categories that are peer to those categories and MINUS categories that are parents to other assigned categories.

Peer categories are categories that all share the same category parent.

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” and “Pumpkin” to a post, peer_categories() would return a list that consists of: “Bell Pepper”, “Cucumber”, and “Pumpkin”. Notice that since “Fruiting” was a parent to a directly assigned category, it and its peers are not included in the list. If only “Fruiting” were selected as a category, then “Leafy”, “Fruiting”, and “Podded” would have been listed.

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_peer_categories();?>

Outputs something like:

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

  • <?php c2c_peer_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_peer_categories(): Outputs the peer categories.
  • c2c_get_peer_categories_list(): Returns the list of peer categories.
  • c2c_get_peer_categories(): Returns the list of peer categories for the specified post.

These are the hooks provided by the plugin:

  • c2c_peer_categories (action), c2c_get_peer_categories_list, c2c_get_peer_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_peer_categories_list (filter):

Customizes the return value of the c2c_peer_categories_list() function.

  • c2c_get_peer_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.

  • related posts
  • the category
  • coffee2code
  • sibling
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.