WordPress at a glance

Categories (рубрика)

cat_is_ancestor_of()

Check if a category is an ancestor of another category.

category_description()

Retrieve category description.

get_cat_ID()

Retrieve the ID of a category from its name.

get_cat_name()

Retrieve the name of a category from its ID.

get_categories()

Retrieve list of category objects.

get_category()

Retrieves category data given a category ID or category object.

get_category_by_slug()

Retrieve category object by category slug.

get_category_link()

Retrieve category link URL.

get_category_parents()

Retrieve category parents with separator.

get_the_category_by_ID()

Retrieve category name based on category ID.

in_category()

Check if the current post is within any of the given categories.

single_cat_title()

Display or retrieve page title for category archive.

wp_create_category()

Add a new category to the database if it does not already exist.

wp_dropdown_categories()

Display or retrieve the HTML dropdown list of categories.

wp_insert_category()

Updates an existing Category or creates a new Category.

wp_list_categories()

Displays a list of categories as HTML links. If you click on the link, all posts from the category will be shown.