
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. The first argument to the template tag allows you to define a custom separator, e.g. to have a simple comma-separated list of peer categories: <?php c2c_peer_categories(','); ?>.
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):
Outputs something like:
<ul><li><a href="https://example.com/category/fruiting/bell-pepper">Bell Pepper</a></li> <li><a href="https://example.com/category/fruiting/cucumber">Cucumber</a></li> <li><a href="https://example.com/category/fruiting/pumpkin">Pumpkin</a></li></ul>
Outputs something like:
<a href="https://example.com/category/fruiting/bell-pepper">Bell Pepper</a>, <a href="https://example.com/category/fruiting/cucumber">Cucumber</a>, <a href="https://example.com/category/fruiting/pumpkin">Pumpkin</a>
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
Developer documentation can be found in DEVELOPER-DOCS.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:
These are the hooks provided by the plugin:
Starting from $0 per month.
Rating
Reviewers
No reviews
Tags
Developed By
Scott Reilly
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Use a subscription button to streamline recurring payments, simplify signup, and help increase conversions with seamless PayPal or Stripe integration.
Show YouTube videos with a YouTube slider that displays clips in a smooth, customizable layout to boost engagement.

Add floating corner pop-ups to share updates, promotions, or messages in a non-intrusive, customizable format.
Use a notification bar to alert users, highlight offers, and drive clicks that boost engagement, signups, and conversions.
Back to top button that improves navigation, speeds up browsing, and helps visitors move smoothly through long pages for a better user experience.
Add a podcast player to your site to embed and organize episodes, provide responsive playback, and keep listeners engaged.
Use a Lottie player to embed lightweight JSON animations that improve visual design, keep pages fast, and create a smoother user experience.

Show Mastodon posts in a live Mastodon feed that keeps content fresh, strengthens your social presence, and helps visitors engage with your updates.
Create interactive quizzes with a quiz maker that lets you build custom questions, collect responses, and increase engagement with easy site integration.
Show products, apps, or designs inside a clean device mockup that improves visualization, builds credibility, and helps visitors make confident decisions.
Use a live weather forecast widget to show current conditions and upcoming predictions, giving visitors real time local weather updates for better planning.

Add a Google powered search bar that delivers relevant results, improves navigation, and helps visitors find content fast.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
