the_category

FUNCTION wp-includes\category-template.php (ligne 265) github
Displays category list for a post in either HTML list or custom format.

Paramètres

Entrée :
$separator = '', $parents = '', $post_id = false
Sortie :
@param string    $separator Optional. Separator between the categories. By default, the links are placed
@param string    $parents   Optional. How to display the parents. Accepts 'multiple', 'single', or empty.
@param int|false $post_id   Optional. ID of the post to retrieve categories for. Defaults to the current post.

Utilisation

// Utilisation de la fonction the_category
$result = the_category($separator = '', $parents = '', $post_id = false);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...