WordPress.org

Plugin Directory

Parentless Categories

Version: 1.1.5 Like the_category(), list categories assigned to a post, but excluding assigned categories that have a child category also assigned to

Template Tags

The plugin provides three optional template tag for use in your theme templates.

Functions

  • <?php function parentless_categories( $separator = '', $post_id = false ) ?> Outputs the parentless categories.

  • <?php function get_parentless_categories_list( $separator = '', $post_id = false ) ?> Gets the list of parentless categories.

  • <?php function get_parentless_categories( $post_id = false ) ?> Returns the list of parentless categories for the specified post.

Arguments

  • $separator Optional argument. (string) String to use as the separator.

  • $post_id Optional argument. (int) Post ID. If 'false', then the current post is assumed. Default is 'false'.

Examples

  • (See Description section)

Requires: 2.5 or higher
Compatible up to: 3.5.1
Last Updated: 2012-12-9
Downloads: 1,699

Ratings

3 stars
3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0