Пример #1
0
</div>
</div>

<?php 
while (have_posts()) {
    the_post();
    ?>
<div class="headerCategory">

    <?php 
    $terms = get_the_terms($post->ID, 'type');
    $term_id = $terms[0]->term_taxonomy_id;
    ?>
    <?php 
    $url = get_taxonomy_image($term_id);
    ?>

    <div class="headerPic" style="background-image:url(<?php 
    echo $url;
    ?>
)"></div>
    <div class="navbarCategory">
        <div class="container">
        <h2><?php 
    the_terms($post->ID, 'type', '');
    ?>
 > <?php 
    the_title();
    ?>
 </h2>
Пример #2
0
</h3>
                    <div class="hover-effect">
                        <a href="<?php 
echo get_term_link($journee);
?>
" class="hover-text">
                            <span>Découvrez nos recettes</span>
                        </a>
                    </div>
                </article>

                <?php 
$soiree = get_term_by('name', 'soiree', 'type');
?>
                <?php 
$url = get_taxonomy_image($soiree->term_id, 'home');
?>
                <article class="col-xs-12 col-sm-6 col-md-6 col-lg-4 day" style="background:url('<?php 
echo $url;
?>
'); background-size:cover; background-position:center top;">
                    <h3><?php 
echo $soiree->name;
?>
</h3>
                    <div class="hover-effect">
                        <a href="<?php 
echo get_term_link($soiree);
?>
" class="hover-text">
                            <span>Découvrez nos recettes</span>