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');
|
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<div class="menu-renovateur-container">
|
||||||
<div class="menu-renovateur">
|
<div class="menu-renovateur">
|
||||||
<div class="website_logo">
|
<div class="website_logo">
|
||||||
<?php if (has_custom_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];
|
$postThematique = get_the_terms($item->object_id, "thematiques")[0];
|
||||||
$postParentThematique = getParentThematique($postThematique);
|
$postParentThematique = getParentThematique($postThematique);
|
||||||
$thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id);
|
$thematiqueCover = get_field('taxonomy_pictures', "thematiques_" . $postParentThematique->term_id);
|
||||||
|
$thematiqueColorslug = getThematiqueFamilySlug($postThematique->slug);
|
||||||
?>
|
?>
|
||||||
<?php if ($postThematique) : ?>
|
<?php if ($postThematique) : ?>
|
||||||
|
|
||||||
<a href="<?php echo $item->url ?>">
|
<a href="<?php echo $item->url ?>">
|
||||||
<img class="sub-menu__navlist__thematique-icon" src="<?php echo $thematiqueCover['icon']['url'] ?>" alt="">
|
<img class="sub-menu__navlist__thematique-icon" src="<?php echo $thematiqueCover['icon']['url'] ?>" alt="">
|
||||||
<div class="details">
|
<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>
|
<p class="sub-menu__navlist__description"><?php echo $postParentThematique->description ?></p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -135,6 +136,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
<?php
|
<?php
|
||||||
$term = get_term($item->object_id, 'thematiques');
|
$term = get_term($item->object_id, 'thematiques');
|
||||||
$mainTaxonomyParent = getMainThematique($term);
|
$mainTaxonomyParent = getMainThematique($term);
|
||||||
|
$thematiqueColorslug = getThematiqueFamilySlug($term->slug);
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'conseils',
|
'post_type' => 'conseils',
|
||||||
'posts_per_page' => 1,
|
'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="">
|
<img class="sub-menu__navlist__thematique-icon" src="<?php echo $cover['icon']['url'] ?>" alt="">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="details">
|
<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>
|
<p class="sub-menu__navlist__description"><?php echo $mainTaxonomyParent->description ?></p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -175,8 +177,13 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<!-- IF CLASSIC SUBMENU -->
|
||||||
<?php else : ?>
|
<?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; ?>
|
<?php endif; ?>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
@ -220,3 +227,4 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
<!-- SEARCH MODULE -->
|
<!-- SEARCH MODULE -->
|
||||||
<?php get_template_part('template-components/header/search-module'); ?>
|
<?php get_template_part('template-components/header/search-module'); ?>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
Loading…
Reference in New Issue
Block a user