the_terms

FUNCTION wp-includes\category-template.php (ligne 1445) github
Displays the terms for a post in a list.

Paramètres

Entrée :
$post_id, $taxonomy, $before = '', $sep = ', ', $after = ''
Sortie :
@param int    $post_id  Post ID.
@param string $taxonomy Taxonomy name.
@param string $before   Optional. String to use before the terms. Default empty.
@param string $sep      Optional. String to use between the terms. Default ', '.
@param string $after    Optional. String to use after the terms. Default empty.
@return void|false Void on success, false on failure.

Utilisation

// Utilisation de la fonction the_terms
$result = the_terms($post_id, $taxonomy, $before = '', $sep = ', ', $after = '');

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

Actualités

Chargement des actualités...