<!--[post/cell-sticker]-->

<?php

    $term_id = get_current_page_main_taxonomy_term_id( get_the_ID() );

    $color = get_term_meta( $term_id, "color", true );

    $color = $color ? $color : "grey";

?>

<span class="sticker-group">

    <?php if( in_array( get_post_type(), ["anew", "yellow"] ) ): ?>

        <a class="sticker sticker--white" href="/news">НОВОСТИ</a>

    <?php endif; ?>

    <?php if( $term_id ) : ?>

        <a class="sticker sticker--<?= $color ?>" href="<?= get_term_link( $term_id ) ?>">

            <?= get_term( $term_id )->name; ?>

        </a>

    <?php endif; ?>

</span>

<!--[/post/cell-sticker]-->