wp_list_categories( string|array $args = '' )

Display or retrieve the HTML list of categories.

17 related functions found for: wp_list_categories

Top ↑

Related terms found for this post

wp-parser-related-wordscategori, categories, category, category-template-php, list, taxonomi, taxonomy, wp-includes, wp-list
wp-parser-packageTemplate, WordPress

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • categori
  • categories
  • category
  • category-template-php
  • list
  • taxonomi
  • taxonomy
  • Template
  • wp-includes
  • wp-includes/category-template.php
  • wp-list
  • template

Top ↑

Description Description

Top ↑

Parameters Parameters


(string|array) (Optional) Array of optional arguments.

  • 'child_of'
    (int) Term ID to retrieve child terms of. See get_terms(). Default 0.
  • 'current_category'
    (int|array) ID of category, or array of IDs of categories, that should get the 'current-cat' class. Default 0.
  • 'depth'
    (int) Category depth. Used for tab indentation. Default 0.
  • 'echo'
    (bool|int) True to echo markup, false to return it. Default 1.
  • 'exclude'
    (array|string) Array or comma/space-separated string of term IDs to exclude. If $hierarchical is true, descendants of $exclude terms will also be excluded; see $exclude_tree. See get_terms().
  • 'exclude_tree'
    (array|string) Array or comma/space-separated string of term IDs to exclude, along with their descendants. See get_terms().
  • 'feed'
    (string) Text to use for the feed link. Default 'Feed for all posts filed under [cat name]'.
  • 'feed_image'
    (string) URL of an image to use for the feed link.
  • 'feed_type'
    (string) Feed type. Used to build feed link. See get_term_feed_link(). Default empty string (default feed).
  • 'hide_empty'
    (bool|int) Whether to hide categories that don't have any posts attached to them. Default 1.
  • 'hide_title_if_empty'
    (bool) Whether to hide the $title_li element if there are no terms in the list. Default false (title will always be shown).
  • 'hierarchical'
    (bool) Whether to include terms that have non-empty descendants. See get_terms(). Default true.
  • 'order'
    (string) Which direction to order categories. Accepts 'ASC' or 'DESC'. Default 'ASC'.
  • 'orderby'
    (string) The column to use for ordering categories. Default 'ID'.
  • 'separator'
    (string) Separator between links. Default '<br />'.
  • 'show_count'
    (bool|int) Whether to show how many posts are in the category. Default 0.
  • 'show_option_all'
    (string) Text to display for showing all categories.
  • 'show_option_none'
    (string) Text to display for the 'no categories' option. Default 'No categories'.
  • 'style'
    (string) The style used to display the categories list. If 'list', categories will be output as an unordered list. If left empty or another value, categories will be output separated by <br> tags. Default 'list'.
  • 'taxonomy'
    (string) Taxonomy name. Default 'category'.
  • 'title_li'
    (string) Text to use for the list title <li> element. Pass an empty string to disable. Default 'Categories'.
  • 'use_desc_for_title'
    (bool|int) Whether to use the category description as the title attribute. Default 1.

Default value: ''

Top ↑

Return Return

(false|string) HTML content only if 'echo' argument is 0.

Top ↑

Source Source

File: wp-includes/category-template.php


Top ↑

Changelog Changelog

Version Description
4.4.0 Introduced the hide_title_if_empty and separator arguments. The current_category argument was modified to optionally accept an array of values.
2.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.