Template Tags/get category parents

Материал из WordPress Wiki

Перейти к: навигация, поиск

Содержание

Description

Returns a list of the parents of a category, including the category, sorted by ID.

Usage

%%% <?php echo(get_category_parents(category, display link, separator, nice name)); ?> %%%

Example

Returns the parent categories of the current category with links separated by '»'

<?php echo(get_category_parents($cat, TRUE, ' &raquo; ')); ?>

will output:

Internet » Blogging » WordPress »

Parameters

category 
(integer) The numeric category ID for which to return the parents. Defaults to current category, if one is set.
display link 
(boolean) Creates a link to each category displayed.
separator 
(string) What to separate each category by.
nice name 
(boolean) Return category nice name or not (defaults to FALSE).

Related

Шаблон:Tag Category Tags

Шаблон:Tag Footer

Реклама

Электронные книги: pocketbook 701.
Информация о технике Panasonic. ремонт принтеров panasonic. Это показалось мне полезным.