diff --git a/resources/css/components/content-meta.css b/resources/css/components/content-meta.css index 8b09452..4575a8c 100644 --- a/resources/css/components/content-meta.css +++ b/resources/css/components/content-meta.css @@ -19,6 +19,7 @@ @apply rounded-full bg-white border-2 border-primary; } &--articles:before, + &--activites:before, &--article:before { @apply w-6 bg-carhop-purple-300 -rotate-45; } diff --git a/template-parts/components/content-meta.php b/template-parts/components/content-meta.php index f18b7a8..baa2e5f 100644 --- a/template-parts/components/content-meta.php +++ b/template-parts/components/content-meta.php @@ -2,11 +2,14 @@ $current_post_id = $args['current_post_id'] ?? get_the_ID(); $current_post_type = $args['current_post_type'] ?? null; $type = null; -$current_post_type_supports_type = is_object_in_taxonomy($current_post_type, 'type'); +$current_post_type_supports_type = get_post_type_supports_type($current_post_type); + $hasNumerotation = hasPostTypeNumerotation($current_post_type); if ($current_post_type_supports_type) { - $type_term = get_the_terms($current_post_id, 'type')[0] ?? null; + // $type = isset($types_terms[0]) ? $types_terms[0] : null; + $type_term = get_post_specific_type_terms($current_post_id)[0] ?? null; + if ($type_term) { $type = $type_term->name; } @@ -17,7 +20,6 @@ if ($current_post_type_supports_type) { } ?> -