few menu adaptations
This commit is contained in:
parent
06cedc3ebd
commit
b6e494e553
|
|
@ -7,6 +7,7 @@ $logoID = get_theme_mod('custom_logo');
|
|||
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||
?>
|
||||
|
||||
<div class="menu-renovateur-container">
|
||||
<div class="menu-renovateur">
|
||||
<div class="website_logo">
|
||||
<?php if (has_custom_logo()) { ?>
|
||||
|
|
@ -116,14 +117,14 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
$postThematique = get_the_terms($item->object_id, "thematiques")[0];
|
||||
$postParentThematique = getParentThematique($postThematique);
|
||||
$thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id);
|
||||
|
||||
$thematiqueColorslug = getThematiqueFamilySlug($postThematique->slug);
|
||||
?>
|
||||
<?php if ($postThematique) : ?>
|
||||
|
||||
<a href="<?php echo $item->url ?>">
|
||||
<img class="sub-menu__navlist__thematique-icon" src="<?php echo $thematiqueCover['icon']['url'] ?>" alt="">
|
||||
<div class="details">
|
||||
<h6><?php echo $postThematique->name ?></h6>
|
||||
<h6 class="<?php echo $thematiqueColorslug ? "text-" . $thematiqueColorslug : "" ?>"><?php echo $postThematique->name ?></h6>
|
||||
<p class="sub-menu__navlist__description"><?php echo $postParentThematique->description ?></p>
|
||||
</div>
|
||||
</a>
|
||||
|
|
@ -135,6 +136,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
<?php
|
||||
$term = get_term($item->object_id, 'thematiques');
|
||||
$mainTaxonomyParent = getMainThematique($term);
|
||||
$thematiqueColorslug = getThematiqueFamilySlug($term->slug);
|
||||
$args = array(
|
||||
'post_type' => 'conseils',
|
||||
'posts_per_page' => 1,
|
||||
|
|
@ -158,7 +160,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
<img class="sub-menu__navlist__thematique-icon" src="<?php echo $cover['icon']['url'] ?>" alt="">
|
||||
<?php endif; ?>
|
||||
<div class="details">
|
||||
<h6><?php echo $title; ?></h6>
|
||||
<h6 class="<?php echo $thematiqueColorslug ? "text-" . $thematiqueColorslug : "" ?>"><?php echo $title; ?></h6>
|
||||
<p class="sub-menu__navlist__description"><?php echo $mainTaxonomyParent->description ?></p>
|
||||
</div>
|
||||
</a>
|
||||
|
|
@ -175,8 +177,13 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- IF CLASSIC SUBMENU -->
|
||||
<?php else : ?>
|
||||
<a href="<?php echo $link; ?>" class="title"><?php echo $title; ?></a>
|
||||
<a href="<?php echo $link; ?>">
|
||||
<p class="title"><?php echo $title; ?></p>
|
||||
<p class="excerpt"><?php echo get_the_excerpt($item->object_id) ?></p>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
|
||||
|
|
@ -220,3 +227,4 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
|||
<!-- SEARCH MODULE -->
|
||||
<?php get_template_part('template-components/header/search-module'); ?>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user