get_the_tags

FUNCTION wp-includes\category-template.php (ligne 1168) github
Retrieves the tags for a post.

Paramètres

Entrée :
$post = 0
Sortie :
@param int|WP_Post $post Post ID or object.
@return WP_Term[]|false|WP_Error Array of WP_Term objects on success, false if there are no terms

Utilisation

// Utilisation de la fonction get_the_tags
$result = get_the_tags($post = 0);

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

Actualités

Chargement des actualités...