stashing
This commit is contained in:
parent
2a75dd5d00
commit
1a1f1c6e9b
337
footer.php
337
footer.php
|
|
@ -1,168 +1,171 @@
|
||||||
<?php get_template_part('template-components/footer/page-scroller'); ?>
|
<?php
|
||||||
</main>
|
switch_to_blog(1);
|
||||||
|
?>
|
||||||
<?php do_action('tailpress_content_end'); ?>
|
|
||||||
|
<?php get_template_part('template-components/footer/page-scroller'); ?>
|
||||||
|
</main>
|
||||||
<?php do_action('tailpress_content_after'); ?>
|
|
||||||
|
<?php do_action('tailpress_content_end'); ?>
|
||||||
<footer id="main_footer" class="site-footer bg-gray-50 py-12" role="contentinfo">
|
|
||||||
<div class="site-footer-grid-container">
|
|
||||||
|
<?php do_action('tailpress_content_after'); ?>
|
||||||
<div class="site-footer__informative-message">
|
|
||||||
<?php
|
<footer id="main_footer" class="site-footer bg-gray-50 py-12" role="contentinfo">
|
||||||
$theme_locations = get_nav_menu_locations();
|
<div class="site-footer-grid-container">
|
||||||
$footer_location_ID = $theme_locations['footer'];
|
|
||||||
$footer_locale_location_ID = apply_filters('wpml_object_id', $footer_location_ID, 'nav_menu', TRUE,);
|
<div class="site-footer__informative-message">
|
||||||
$theme_locations = get_nav_menu_locations();
|
<?php
|
||||||
|
$theme_locations = get_nav_menu_locations();
|
||||||
?>
|
$footer_location_ID = $theme_locations['footer'];
|
||||||
<?php $footer_superior_info_message = get_field('footer_superior_info_message', 'term_' . $footer_locale_location_ID); ?>
|
$footer_locale_location_ID = apply_filters('wpml_object_id', $footer_location_ID, 'nav_menu', TRUE,);
|
||||||
<?php
|
$theme_locations = get_nav_menu_locations();
|
||||||
?>
|
|
||||||
<img src='<?php echo get_template_directory_uri() ?>/resources/img/pictogrammes/icone-info.svg' alt=''>
|
?>
|
||||||
<p class=""><?php echo $footer_superior_info_message['message'] ?></p>
|
<?php $footer_superior_info_message = get_field('footer_superior_info_message', 'term_' . $footer_locale_location_ID); ?>
|
||||||
</div>
|
<?php
|
||||||
|
?>
|
||||||
<div class="site-footer__infos-contact">
|
<img src='<?php echo get_template_directory_uri() ?>/resources/img/pictogrammes/icone-info.svg' alt=''>
|
||||||
<?php $infos_contact = get_field('footer_infos_contact_datagroup', 'term_' . $footer_locale_location_ID); ?>
|
<p class=""><?php echo $footer_superior_info_message['message'] ?></p>
|
||||||
<div class="point-info">
|
</div>
|
||||||
<h4 class="content-intertitle"><?php echo $infos_contact['point_info']['title'] ?></h4>
|
|
||||||
<p><?php echo $infos_contact['point_info']['text'] ?></p>
|
<div class="site-footer__infos-contact">
|
||||||
</div>
|
<?php $infos_contact = get_field('footer_infos_contact_datagroup', 'term_' . $footer_locale_location_ID); ?>
|
||||||
<div class="permanenc-telephonique">
|
<div class="point-info">
|
||||||
<?php $footer_superior_info_message = get_field('footer_superior_info_message', 'term_' . $footer_locale_location_ID); ?>
|
<h4 class="content-intertitle"><?php echo $infos_contact['point_info']['title'] ?></h4>
|
||||||
|
<p><?php echo $infos_contact['point_info']['text'] ?></p>
|
||||||
<h4 class="content-intertitle"><?php echo $infos_contact['permanence_telephonique']['title'] ?></h4>
|
</div>
|
||||||
<p><?php echo $infos_contact['permanence_telephonique']['text'] ?></p>
|
<div class="permanenc-telephonique">
|
||||||
</div>
|
<?php $footer_superior_info_message = get_field('footer_superior_info_message', 'term_' . $footer_locale_location_ID); ?>
|
||||||
<div class="en-ligne">
|
|
||||||
<h4 class="content-intertitle"><?php echo $infos_contact['en_ligne']['title'] ?></h4>
|
<h4 class="content-intertitle"><?php echo $infos_contact['permanence_telephonique']['title'] ?></h4>
|
||||||
<p><?php echo $infos_contact['en_ligne']['text'] ?></p>
|
<p><?php echo $infos_contact['permanence_telephonique']['text'] ?></p>
|
||||||
<a class="external-link" href="<?php echo $infos_contact['en_ligne']['form_url'] ?>" target="blank"><?php echo $infos_contact['en_ligne']['form_btn_text'] ?></a>
|
</div>
|
||||||
|
<div class="en-ligne">
|
||||||
</div>
|
<h4 class="content-intertitle"><?php echo $infos_contact['en_ligne']['title'] ?></h4>
|
||||||
</div>
|
<p><?php echo $infos_contact['en_ligne']['text'] ?></p>
|
||||||
|
<a class="external-link" href="<?php echo $infos_contact['en_ligne']['form_url'] ?>" target="blank"><?php echo $infos_contact['en_ligne']['form_btn_text'] ?></a>
|
||||||
|
|
||||||
<div class="site-footer__navigation-menu">
|
</div>
|
||||||
|
</div>
|
||||||
<div class="menu-renovateur--footer menu-renovateur">
|
|
||||||
<?php get_template_part('template-components/footer/menu-renovateur-footer'); ?>
|
|
||||||
</div>
|
<div class="site-footer__navigation-menu">
|
||||||
<?php
|
|
||||||
wp_nav_menu(
|
<div class="menu-renovateur--footer menu-renovateur">
|
||||||
array(
|
<?php get_template_part('template-components/footer/menu-renovateur-footer'); ?>
|
||||||
'container' => 'false',
|
</div>
|
||||||
'theme_location' => 'homegrade',
|
|
||||||
'li_class' => 'menu-navlink',
|
<?php
|
||||||
'fallback_cb' => false,
|
wp_nav_menu(
|
||||||
'menu_class' => 'menu-homegrade--footer',
|
array(
|
||||||
)
|
'container' => 'false',
|
||||||
);
|
'theme_location' => 'homegrade',
|
||||||
?>
|
'li_class' => 'menu-navlink',
|
||||||
<div class="extra_details">
|
'fallback_cb' => false,
|
||||||
<?php
|
'menu_class' => 'menu-homegrade--footer',
|
||||||
$social_networks = get_field('social_networks_profiles', "option");
|
)
|
||||||
$localizedSiteMapPage = apply_filters('wpml_object_id', 5699, 'page', TRUE);
|
);
|
||||||
?>
|
?>
|
||||||
|
<div class="extra_details">
|
||||||
|
<?php
|
||||||
<a class="cta cta--button cta--outline" href="<?php echo get_the_permalink($localizedSiteMapPage) ?>">
|
$social_networks = get_field('social_networks_profiles', "option");
|
||||||
<?php echo get_the_title($localizedSiteMapPage) ?>
|
$localizedSiteMapPage = apply_filters('wpml_object_id', 5699, 'page', TRUE);
|
||||||
</a>
|
?>
|
||||||
<div class="social-networks">
|
|
||||||
<a class="cta cta--circular cta--secondary" title="<?php echo __('Facebook', "homegrade-theme__texte-fonctionnel") ?>" href="<?php echo $social_networks['facebook_profile_url'] ?>">
|
<?php
|
||||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-facebook.svg' ?>" alt="">
|
switch_to_blog(2);
|
||||||
</a>
|
$home_url_metiers_patrimoine = get_home_url();
|
||||||
<a class="cta cta--circular cta--secondary" title="<?php echo __('Youtube', "homegrade-theme__texte-fonctionnel") ?>" href="<?php echo $social_networks['youtube_profile_url'] ?>">
|
restore_current_blog();
|
||||||
<img src=" <?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-youtube.svg' ?>" alt="">
|
?>
|
||||||
</a>
|
<a class="cta cta--button cta--outline metiers-patrimoine-btn" href="<?php echo $home_url_metiers_patrimoine ?>"><?php echo __('Artisans du patrimoine', 'homegrade') ?></a>
|
||||||
|
|
||||||
</div>
|
<a class="cta cta--button cta--outline sitemap-btn" href="<?php echo get_the_permalink($localizedSiteMapPage) ?>">
|
||||||
|
<?php echo get_the_title($localizedSiteMapPage) ?>
|
||||||
</div>
|
</a>
|
||||||
|
<div class="social-networks">
|
||||||
|
<a class="cta cta--circular cta--secondary" title="<?php echo __('Facebook', "homegrade-theme__texte-fonctionnel") ?>" href="<?php echo $social_networks['facebook_profile_url'] ?>">
|
||||||
</div>
|
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-facebook.svg' ?>" alt="">
|
||||||
|
</a>
|
||||||
<ul class="site-footer__partenaires">
|
<a class="cta cta--circular cta--secondary" title="<?php echo __('Youtube', "homegrade-theme__texte-fonctionnel") ?>" href="<?php echo $social_networks['youtube_profile_url'] ?>">
|
||||||
<?php $partenaires = get_field('footer_partenaires', 'term_' . $footer_locale_location_ID)['partenaires']; ?>
|
<img src=" <?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icone-social-youtube.svg' ?>" alt="">
|
||||||
<?php foreach ($partenaires as $partenaire) : ?>
|
</a>
|
||||||
<li>
|
|
||||||
<a href=" <?php echo $partenaire['url'] ?>" target="_blank">
|
</div>
|
||||||
<img src='<?php echo $partenaire['logo']['url'] ?>' alt='<?php echo $partenaire['name'] ?>'>
|
|
||||||
</a>
|
</div>
|
||||||
</li>
|
|
||||||
<?php endforeach; ?>
|
</div>
|
||||||
</ul>
|
|
||||||
|
<ul class="site-footer__partenaires">
|
||||||
<div class="site-footer__metiers-patrimoine">
|
<h4 class="content-intertitle"><?php echo __('Nos partenaires', 'metiers-patrimoine-theme') ?></h4>
|
||||||
<?php $metiers_patrimoine = get_field('footer_metiers_du_patirmoine', 'term_' . $footer_locale_location_ID); ?>
|
|
||||||
|
<?php $partenaires = get_field('footer_partenaires', 'term_' . $footer_locale_location_ID)['partenaires']; ?>
|
||||||
<h4 class="content-intertitle"><?php echo $metiers_patrimoine['title'] ?> </h4>
|
<?php foreach ($partenaires as $partenaire) : ?>
|
||||||
<p><?php echo $metiers_patrimoine['text'] ?> </p>
|
<li>
|
||||||
<a class="cta cta cta--primary cta--button" href="<?php echo $metiers_patrimoine['cta_url'] ?> " target="_blank"><?php echo $metiers_patrimoine['cta_text'] ?></a>
|
<a href=" <?php echo $partenaire['url'] ?>" target="_blank">
|
||||||
</div>
|
<img src='<?php echo $partenaire['logo']['url'] ?>' alt='<?php echo $partenaire['name'] ?>'>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
<?php do_action('tailpress_footer'); ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="footer-credits">
|
|
||||||
<div class="website-credits">
|
|
||||||
<img class="homegrade-sigle-icon" src="<?php echo get_template_directory_uri() . '/resources/img/logos/logo-homegrade-sigle.svg' ?>" alt="">
|
<?php do_action('tailpress_footer'); ?>
|
||||||
<div>
|
</div>
|
||||||
© <?php echo date_i18n('Y'); ?> - <?php echo get_bloginfo('name'); ?>
|
|
||||||
<p class="made-by" lang="en">Made with
|
<div class="footer-credits">
|
||||||
<span class="sr-only">love</span>
|
<div class="website-credits">
|
||||||
<span>
|
<img class="homegrade-sigle-icon" src="<?php echo get_template_directory_uri() . '/resources/img/logos/logo-homegrade-sigle.svg' ?>" alt="">
|
||||||
<svg viewBox="0 0 825.22 700.44">
|
<div>
|
||||||
<g>
|
© <?php echo date_i18n('Y'); ?> - <?php echo get_bloginfo('name'); ?>
|
||||||
<path class="cls-1" d="m804.05,123.44c-25.5-54.3-74.5-96-131.6-113.7-56.2-17.5-118.7-11-170.3,17.2-35,19.2-61.9,49.6-89.7,77.6-6.6-6.6-13.2-13.2-19.8-19.8-12-12-23.7-24.7-36.9-35.4C301.75,5.54,229.25-10.56,161.75,6.94,98.25,23.44,43.75,69.54,17.85,129.94c-24,56-23.7,119.1.3,175,12.7,29.7,32.5,54.3,55.1,76.9l52.8,52.8c26.8,26.8,53.6,53.5,80.3,80.3,28.1,28.1,56.2,56.2,84.3,84.3,21.5,21.5,43.1,43.1,64.7,64.7,12.7,12.7,26.3,30.2,44.4,34.9,17,4.4,34.7-.5,47.4-12.3l.6-.6.5-.5,26.9-26.9,67.2-67.2,84.2-84.2,78.4-78.4,49.9-49.9c2.8-2.8,5.7-5.6,8.5-8.5,21.3-21.7,37.5-47.6,48.2-76,20.9-55.2,17.4-117.8-7.5-170.9Z" />
|
<p class="made-by" lang="en">Made with
|
||||||
</g>
|
<span class="sr-only">love</span>
|
||||||
</svg>
|
<span>
|
||||||
</span> by<a href="https://deligraph.com/" target="_blank"> Deligraph</a>
|
<svg viewBox="0 0 825.22 700.44">
|
||||||
</p>
|
<g>
|
||||||
</div>
|
<path class="cls-1" d="m804.05,123.44c-25.5-54.3-74.5-96-131.6-113.7-56.2-17.5-118.7-11-170.3,17.2-35,19.2-61.9,49.6-89.7,77.6-6.6-6.6-13.2-13.2-19.8-19.8-12-12-23.7-24.7-36.9-35.4C301.75,5.54,229.25-10.56,161.75,6.94,98.25,23.44,43.75,69.54,17.85,129.94c-24,56-23.7,119.1.3,175,12.7,29.7,32.5,54.3,55.1,76.9l52.8,52.8c26.8,26.8,53.6,53.5,80.3,80.3,28.1,28.1,56.2,56.2,84.3,84.3,21.5,21.5,43.1,43.1,64.7,64.7,12.7,12.7,26.3,30.2,44.4,34.9,17,4.4,34.7-.5,47.4-12.3l.6-.6.5-.5,26.9-26.9,67.2-67.2,84.2-84.2,78.4-78.4,49.9-49.9c2.8-2.8,5.7-5.6,8.5-8.5,21.3-21.7,37.5-47.6,48.2-76,20.9-55.2,17.4-117.8-7.5-170.9Z" />
|
||||||
</div>
|
</g>
|
||||||
|
</svg>
|
||||||
<ul class="legal-credits">
|
</span> by<a href="https://deligraph.com/" target="_blank">Deligraph</a>
|
||||||
<?php
|
</p>
|
||||||
$localizedCookiePage = apply_filters('wpml_object_id', 3502, 'page', TRUE);
|
</div>
|
||||||
$localizedConditionsGenerales = apply_filters('wpml_object_id', 3504, 'page', TRUE);
|
</div>
|
||||||
$localizedPolitiqueConfidentialite = apply_filters('wpml_object_id', 3, 'page', TRUE);
|
|
||||||
$localizedDeclarationAccessibilite = apply_filters('wpml_object_id', 3506, 'page', TRUE);
|
<ul class="legal-credits">
|
||||||
|
<?php
|
||||||
?>
|
$localizedCookiePage = apply_filters('wpml_object_id', 3502, 'page', TRUE);
|
||||||
|
$localizedConditionsGenerales = apply_filters('wpml_object_id', 3504, 'page', TRUE);
|
||||||
<li class="legal-credits__legal-page-link">
|
$localizedPolitiqueConfidentialite = apply_filters('wpml_object_id', 3, 'page', TRUE);
|
||||||
<a href="<?php echo get_the_permalink($localizedConditionsGenerales) ?>"><?php echo get_the_title($localizedConditionsGenerales) ?></a>
|
$localizedDeclarationAccessibilite = apply_filters('wpml_object_id', 3506, 'page', TRUE);
|
||||||
</li>
|
?>
|
||||||
<li class="legal-credits__legal-page-link">
|
|
||||||
<a href="<?php echo get_the_permalink($localizedCookiePage) ?>"><?php echo get_the_title($localizedCookiePage) ?></a>
|
<li class="legal-credits__legal-page-link">
|
||||||
</li>
|
<a href="<?php echo get_the_permalink($localizedConditionsGenerales) ?>"><?php echo get_the_title($localizedConditionsGenerales) ?></a>
|
||||||
<li class="legal-credits__legal-page-link">
|
</li>
|
||||||
<a href="<?php echo get_the_permalink($localizedPolitiqueConfidentialite) ?>"><?php echo get_the_title($localizedPolitiqueConfidentialite) ?></a>
|
<li class="legal-credits__legal-page-link">
|
||||||
</li>
|
<a href="<?php echo get_the_permalink($localizedCookiePage) ?>"><?php echo get_the_title($localizedCookiePage) ?></a>
|
||||||
<li class="legal-credits__legal-page-link">
|
</li>
|
||||||
<a href="<?php echo get_the_permalink($localizedDeclarationAccessibilite) ?>"><?php echo get_the_title($localizedDeclarationAccessibilite) ?></a>
|
<li class="legal-credits__legal-page-link">
|
||||||
</li>
|
<a href="<?php echo get_the_permalink($localizedPolitiqueConfidentialite) ?>"><?php echo get_the_title($localizedPolitiqueConfidentialite) ?></a>
|
||||||
</ul>
|
</li>
|
||||||
|
<li class="legal-credits__legal-page-link">
|
||||||
</div>
|
<a href="<?php echo get_the_permalink($localizedDeclarationAccessibilite) ?>"><?php echo get_the_title($localizedDeclarationAccessibilite) ?></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</footer>
|
|
||||||
|
</div>
|
||||||
</div>
|
</footer>
|
||||||
|
</div>
|
||||||
<?php wp_footer(); ?>
|
|
||||||
|
<?php
|
||||||
|
restore_current_blog();
|
||||||
|
?>
|
||||||
</body>
|
<?php wp_footer(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -16,3 +16,4 @@ require_once(__DIR__ . '/includes/wysiwyg.php');
|
||||||
require_once(__DIR__ . '/includes/search.php');
|
require_once(__DIR__ . '/includes/search.php');
|
||||||
require_once(__DIR__ . '/includes/rooting.php');
|
require_once(__DIR__ . '/includes/rooting.php');
|
||||||
require_once(__DIR__ . '/includes/forms.php');
|
require_once(__DIR__ . '/includes/forms.php');
|
||||||
|
require_once(__DIR__ . '/includes/wpml.php');
|
||||||
|
|
|
||||||
20
header.php
20
header.php
|
|
@ -8,17 +8,17 @@
|
||||||
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
|
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
|
||||||
<?php wp_head(); ?>
|
<?php wp_head(); ?>
|
||||||
</head>
|
</head>
|
||||||
<?php $currentLanguage = apply_filters('wpml_current_language', null); ?>
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$currentLanguage = apply_filters('wpml_current_language', null);
|
||||||
|
switch_to_blog(1)
|
||||||
|
?>
|
||||||
|
|
||||||
<body <?php body_class("homegrade-frontend-page ") ?> current-language="<?php echo $currentLanguage ?? "" ?>">
|
<body <?php body_class("homegrade-frontend-page ") ?> current-language="<?php echo $currentLanguage ?? "" ?>">
|
||||||
<?php
|
<?php
|
||||||
do_action('tailpress_site_before');
|
do_action('tailpress_site_before');
|
||||||
global $post;
|
global $post;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="page-<?php echo $post->post_name ?? "" ?>" class="min-h-screen flex flex-col ">
|
<div id="page-<?php echo $post->post_name ?? "" ?>" class="min-h-screen flex flex-col ">
|
||||||
|
|
||||||
<div class="skiplinks" aria-label="<?php echo __('Accès rapide', 'homegrade-theme__texte-fonctionnel') ?>">
|
<div class="skiplinks" aria-label="<?php echo __('Accès rapide', 'homegrade-theme__texte-fonctionnel') ?>">
|
||||||
|
|
@ -31,13 +31,11 @@
|
||||||
<?php do_action('tailpress_header'); ?>
|
<?php do_action('tailpress_header'); ?>
|
||||||
|
|
||||||
<header id="main-header">
|
<header id="main-header">
|
||||||
|
|
||||||
<!-- MENU MOBILE -->
|
<!-- MENU MOBILE -->
|
||||||
<?php
|
<?php get_template_part('template-components/header/mobile-brand'); ?>
|
||||||
get_template_part('template-components/header/mobile-brand');
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- MENU HOMEGRADE -->
|
<!-- MENU HOMEGRADE -->
|
||||||
|
|
||||||
<?php get_template_part('template-components/header/menu-homegrade'); ?>
|
<?php get_template_part('template-components/header/menu-homegrade'); ?>
|
||||||
<?php get_template_part('template-components/header/menu-renovateur'); ?>
|
<?php get_template_part('template-components/header/menu-renovateur'); ?>
|
||||||
|
|
||||||
|
|
@ -47,5 +45,7 @@
|
||||||
|
|
||||||
<?php do_action('tailpress_content_start'); ?>
|
<?php do_action('tailpress_content_start'); ?>
|
||||||
|
|
||||||
|
<main id="content" class="site-content flex-grow">
|
||||||
<main id="content" class="site-content flex-grow">
|
<?php
|
||||||
|
restore_current_blog();
|
||||||
|
?>
|
||||||
|
|
@ -7,15 +7,14 @@
|
||||||
|
|
||||||
function register_theme_settings_option_page()
|
function register_theme_settings_option_page()
|
||||||
{
|
{
|
||||||
|
$current_blog_id = get_current_blog_id();
|
||||||
|
|
||||||
// Check function exists.
|
if (function_exists('acf_add_options_page') && $current_blog_id === 1) {
|
||||||
if (function_exists('acf_add_options_page')) {
|
|
||||||
|
|
||||||
// Register options page.
|
// Register options page.
|
||||||
$homegrade_option_page = acf_add_options_page(array(
|
$homegrade_option_page = acf_add_options_page(array(
|
||||||
'page_title' => __('Paramètres & Outils', 'homegrade-theme__texte-backoffice'),
|
'page_title' => __('Paramètres & Outils', 'homegrade-theme__texte-backoffice'),
|
||||||
'menu_title' => __('Paramètres', 'homegrade-theme__texte-backoffice'),
|
'menu_title' => __('Paramètres', 'homegrade-theme__texte-backoffice'),
|
||||||
|
|
||||||
'menu_slug' => 'theme-general-settings',
|
'menu_slug' => 'theme-general-settings',
|
||||||
'capability' => 'activate_plugins',
|
'capability' => 'activate_plugins',
|
||||||
'redirect' => false,
|
'redirect' => false,
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@ function add_menu_item($menu_items)
|
||||||
return $menu_items;
|
return $menu_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function homegrade_stats_option_page()
|
function homegrade_stats_option_page()
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
|
@ -90,9 +88,6 @@ function generate_order_datas_to_csv()
|
||||||
$document_id_nl = $document['id_nl'] ?? null;
|
$document_id_nl = $document['id_nl'] ?? null;
|
||||||
$document_quantity_nl = $document['quantity_nl'] ?? null;
|
$document_quantity_nl = $document['quantity_nl'] ?? null;
|
||||||
|
|
||||||
$dateCreatedRaw = $entry['date_created'] ?? '';
|
|
||||||
$dateCreated = $dateCreatedRaw ? date('d / m / Y', strtotime($dateCreatedRaw)) : '';
|
|
||||||
|
|
||||||
if (!$document_quantity_fr && !$document_quantity_nl) {
|
if (!$document_quantity_fr && !$document_quantity_nl) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -108,7 +103,6 @@ function generate_order_datas_to_csv()
|
||||||
'company_type' => $companyType,
|
'company_type' => $companyType,
|
||||||
'zipCode' => $zipCode,
|
'zipCode' => $zipCode,
|
||||||
'userLanguage' => $userLanguage,
|
'userLanguage' => $userLanguage,
|
||||||
'order_date' => $dateCreated,
|
|
||||||
];
|
];
|
||||||
array_push($output_formatted_entries, $document_formatted_order_nl);
|
array_push($output_formatted_entries, $document_formatted_order_nl);
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +119,6 @@ function generate_order_datas_to_csv()
|
||||||
'company_type' => $companyType,
|
'company_type' => $companyType,
|
||||||
'zipCode' => $zipCode,
|
'zipCode' => $zipCode,
|
||||||
'userLanguage' => $userLanguage,
|
'userLanguage' => $userLanguage,
|
||||||
'order_date' => $dateCreated,
|
|
||||||
];
|
];
|
||||||
array_push($output_formatted_entries, $document_formatted_order_fr);
|
array_push($output_formatted_entries, $document_formatted_order_fr);
|
||||||
}
|
}
|
||||||
|
|
@ -143,7 +136,7 @@ function generate_order_datas_to_csv()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ajouter les en-têtes du CSV
|
// Ajouter les en-têtes du CSV
|
||||||
fputcsv($file, ['Publication', 'Quantité', 'Langue de la publication', 'Thématique', 'ID de la brochure', 'Type d\'organisme', 'Code Postal', 'Langue de l\'utilisateur', 'Date de la commande']);
|
fputcsv($file, ['Publication', 'Quantité', 'Langue de la publication', 'Thématique', 'ID de la brochure', 'Type d\'organisme', 'Code Postal', 'Langue de l\'utilisateur']);
|
||||||
|
|
||||||
// Boucler sur chaque entrée formatée et l'écrire dans le CSV
|
// Boucler sur chaque entrée formatée et l'écrire dans le CSV
|
||||||
foreach ($output_formatted_entries as $entry) {
|
foreach ($output_formatted_entries as $entry) {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
* Theme setup.
|
* Theme setup.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
function tailpress_setup()
|
function tailpress_setup()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -61,7 +62,7 @@ function homegrade_enqueue_scripts()
|
||||||
wp_enqueue_script('gsap', get_template_directory_uri() . '/assets/gsap/gsap.min.js', array(), $theme->get('Version'));
|
wp_enqueue_script('gsap', get_template_directory_uri() . '/assets/gsap/gsap.min.js', array(), $theme->get('Version'));
|
||||||
wp_enqueue_script('swiperjs', get_template_directory_uri() . '/assets/swiper/swiper-bundle_11.min.js', array(), $theme->get('Version'));
|
wp_enqueue_script('swiperjs', get_template_directory_uri() . '/assets/swiper/swiper-bundle_11.min.js', array(), $theme->get('Version'));
|
||||||
wp_enqueue_style('swipercss', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.css', array(), $theme->get('Version'));
|
wp_enqueue_style('swipercss', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.css', array(), $theme->get('Version'));
|
||||||
wp_enqueue_style('tailpress', tailpress_asset('css/app.css'), array(), $theme->get('Version'));
|
wp_enqueue_style('homegrade-main-css', get_template_directory_uri() . '/css/app.css', array(), $theme->get('Version'));
|
||||||
|
|
||||||
// #PASSING TRANSLATIONS
|
// #PASSING TRANSLATIONS
|
||||||
wp_register_script('main-app-js', get_template_directory_uri() . '/js/app.js', array('gsap', 'jquery'), $theme->get('Version'));
|
wp_register_script('main-app-js', get_template_directory_uri() . '/js/app.js', array('gsap', 'jquery'), $theme->get('Version'));
|
||||||
|
|
@ -89,6 +90,15 @@ add_action('wp_enqueue_scripts', 'homegrade_enqueue_scripts');
|
||||||
Enqueue Theme assets 🡒 Back
|
Enqueue Theme assets 🡒 Back
|
||||||
-----------------------------------------------------------*/
|
-----------------------------------------------------------*/
|
||||||
add_action('enqueue_block_editor_assets', 'homegrade_enqueue_scripts');
|
add_action('enqueue_block_editor_assets', 'homegrade_enqueue_scripts');
|
||||||
|
|
||||||
|
function homegrade_enqueue_back_scripts()
|
||||||
|
{
|
||||||
|
wp_enqueue_script('metiers-theme-editor-js', get_stylesheet_directory_uri() . '/js/editor.js', array(), $theme->get('Version'));
|
||||||
|
}
|
||||||
|
|
||||||
|
add_action('enqueue_block_editor_assets', 'homegrade_enqueue_scripts');
|
||||||
|
|
||||||
|
|
||||||
// ALSO SEE add_editor_style('css/editor-style.css') line 41
|
// ALSO SEE add_editor_style('css/editor-style.css') line 41
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,38 +16,85 @@ function wrap_parent_menu_item_buttons($output, $item, $depth, $args)
|
||||||
$output = '<h6 class="page-group-title">' . $item->title . '</h6>';
|
$output = '<h6 class="page-group-title">' . $item->title . '</h6>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// #### MENU RENOVATEUR
|
|
||||||
// if ($args->theme_location === "renovateur") {
|
|
||||||
// $page_icon = get_field('page_icon', $item->object_id);
|
|
||||||
|
|
||||||
// if (in_array('menu-item-has-children', $item->classes, true)) {
|
|
||||||
// $output = '<button type="button" class="footer__submenu-toggle" aria-expanded="false" aria-controls="sub-menu-' . $item->ID . '">' . $item->title . '</button>';
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // #### ICONE DE PAGE FOR TOP LEVEL MENU ITEMS
|
|
||||||
// if (isset($page_icon['url'])) {
|
|
||||||
// $icon = '<img class="page_icon" src="' . $page_icon['url'] . '" alt=""/>';
|
|
||||||
// $link = $output;
|
|
||||||
// $output = $icon . $link;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// // #### TAXONOMY : GET ICON & INFOS ABOUT TAX
|
|
||||||
|
|
||||||
// if ($item->type === "taxonomy") {
|
|
||||||
// $term = get_term_by('id', $item->object_id, 'thematiques');
|
|
||||||
// $cover = get_field('taxonomy_pictures', "thematiques_" . $item->object_id);
|
|
||||||
|
|
||||||
// $output = '<a class="lol" href="' . $item->url . '">';
|
|
||||||
// $output .= '<img class="thematique-icon" src="' . $cover['icon']['url'] . '"/>';
|
|
||||||
// $output .= '<h6>' . $item->title . "</h6>";
|
|
||||||
// $output .= '<p>' . $term->description . "</p>";
|
|
||||||
// $output .= "</a>";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
add_filter('walker_nav_menu_start_el', 'wrap_parent_menu_item_buttons', 10, 4);
|
add_filter('walker_nav_menu_start_el', 'wrap_parent_menu_item_buttons', 10, 4);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------
|
||||||
|
Hide Page presse from homegrade top-menu but not footer
|
||||||
|
-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
function metiers_patrimoine_filter_menu_items($items, $args)
|
||||||
|
{
|
||||||
|
|
||||||
|
// ID de l'élément de menu à masquer
|
||||||
|
$isMenuHomegradeInFooter = $args->menu_class === 'menu-homegrade--footer';
|
||||||
|
|
||||||
|
foreach ($items as $key => $item) {
|
||||||
|
$isPagePresse = $item->object_id == "2784" || $item->object_id == "4973";
|
||||||
|
|
||||||
|
if ($isPagePresse && !$isMenuHomegradeInFooter) {
|
||||||
|
unset($items[$key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $items;
|
||||||
|
}
|
||||||
|
add_filter('wp_nav_menu_objects', 'metiers_patrimoine_filter_menu_items', 10, 2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------
|
||||||
|
PASS CUSTOM WPML NAV SWITCHER TO MENU
|
||||||
|
-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
add_filter('wp_nav_menu_items', 'add_custom_item_to_menu', 10, 2);
|
||||||
|
function add_custom_item_to_menu($items, $args)
|
||||||
|
{
|
||||||
|
|
||||||
|
$isMenuHomegradeInFooter = $args->menu_class === 'menu-homegrade--footer';
|
||||||
|
|
||||||
|
// restore_current_blog();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ($args->theme_location === 'homegrade' && !$isMenuHomegradeInFooter) {
|
||||||
|
/* BOUTON METIERS DU PATRIMOINE */
|
||||||
|
|
||||||
|
switch_to_blog(2);
|
||||||
|
// $home_url_metiers_patrimoine = get_home_url();
|
||||||
|
$home_url_metiers_patrimoine = get_the_permalink(43);
|
||||||
|
// switch_to_blog(1);
|
||||||
|
restore_current_blog();
|
||||||
|
|
||||||
|
$items .= '<li id="menu-item-artisan-du-patrimoine" class="menu-item menu-item-type-post_type menu-item-object-page menu-navlink ">';
|
||||||
|
$items .= '<a href="' . $home_url_metiers_patrimoine . '">';
|
||||||
|
$items .= __('Artisans du patrimoine', 'homegrade');
|
||||||
|
$items .= '</a>';
|
||||||
|
$items .= '</li>';
|
||||||
|
|
||||||
|
|
||||||
|
/* WPML NAV SWITCHER */
|
||||||
|
ob_start();
|
||||||
|
// switch_to_blog(1);
|
||||||
|
restore_current_blog();
|
||||||
|
// do_action('wpml_language_switcher', array('flags' => false, 'translated' => false, 'link_current' => true));
|
||||||
|
do_action('wpml_add_language_selector');
|
||||||
|
|
||||||
|
switch_to_blog(1);
|
||||||
|
$wpmlnav = ob_get_clean();
|
||||||
|
|
||||||
|
$items .= '<li class="menu-item menu-item-type-post_type menu-item-object-page menu-navlink">';
|
||||||
|
$items .= $wpmlnav;
|
||||||
|
$items .= '</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// switch_to_blog(1);
|
||||||
|
|
||||||
|
return $items;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,202 +1,204 @@
|
||||||
<?php
|
<?php
|
||||||
|
// Change Defaults Posts to "News" in menu bar
|
||||||
|
function cp_change_post_object()
|
||||||
// Change Defaults Posts to "News" in menu bar
|
{
|
||||||
function cp_change_post_object()
|
$get_post_type = get_post_type_object('post');
|
||||||
{
|
|
||||||
$get_post_type = get_post_type_object('post');
|
$labels = $get_post_type->labels;
|
||||||
|
$labels->name = 'News';
|
||||||
$labels = $get_post_type->labels;
|
$labels->singular_name = 'News';
|
||||||
$labels->name = 'News';
|
$labels->add_new = 'Ajouter une Actu';
|
||||||
$labels->singular_name = 'News';
|
$labels->add_new_item = 'Ajouter une Actu';
|
||||||
$labels->add_new = 'Ajouter une Actu';
|
$labels->edit_item = 'Editer l\'actualité';
|
||||||
$labels->add_new_item = 'Ajouter une Actu';
|
$labels->new_item = 'News';
|
||||||
$labels->edit_item = 'Editer l\'actualité';
|
$labels->view_item = 'Voir l\'actualité';
|
||||||
$labels->new_item = 'News';
|
$labels->search_items = 'Chercher une Actualité';
|
||||||
$labels->view_item = 'Voir l\'actualité';
|
$labels->not_found = 'Pas de News trouvée';
|
||||||
$labels->search_items = 'Chercher une Actualité';
|
$labels->not_found_in_trash = 'Pas de News trouvée dans la corbeille';
|
||||||
$labels->not_found = 'Pas de News trouvée';
|
$labels->all_items = 'Toutes les Actus';
|
||||||
$labels->not_found_in_trash = 'Pas de News trouvée dans la corbeille';
|
$labels->menu_name = 'News';
|
||||||
$labels->all_items = 'Toutes les Actus';
|
$labels->name_admin_bar = 'News';
|
||||||
$labels->menu_name = 'News';
|
}
|
||||||
$labels->name_admin_bar = 'News';
|
add_action('init', 'cp_change_post_object');
|
||||||
}
|
|
||||||
add_action('init', 'cp_change_post_object');
|
|
||||||
|
// Change Defaults Posts Icon in menu bar
|
||||||
|
|
||||||
// Change Defaults Posts Icon in menu bar
|
function change_menu_icon()
|
||||||
|
{
|
||||||
function change_menu_icon()
|
|
||||||
{
|
// Access global variables.
|
||||||
|
global $menu;
|
||||||
// Access global variables.
|
|
||||||
global $menu;
|
foreach ($menu as $key => $val) {
|
||||||
|
|
||||||
foreach ($menu as $key => $val) {
|
if (__('News', 'homegrade-theme__texte-backoffice') == $val[0]) {
|
||||||
|
$menu[$key][6] = 'dashicons-welcome-widgets-menus';
|
||||||
if (__('News', 'homegrade-theme__texte-backoffice') == $val[0]) {
|
}
|
||||||
$menu[$key][6] = 'dashicons-welcome-widgets-menus';
|
}
|
||||||
}
|
}
|
||||||
}
|
add_action('admin_menu', 'change_menu_icon');
|
||||||
}
|
|
||||||
add_action('admin_menu', 'change_menu_icon');
|
// #### POST TYPES
|
||||||
|
function create_posttype()
|
||||||
// #### POST TYPES
|
{
|
||||||
function create_posttype()
|
|
||||||
{
|
if (get_current_blog_id() != 1) {
|
||||||
// **** CONSEILS
|
return;
|
||||||
register_post_type(
|
}
|
||||||
'conseils',
|
// **** CONSEILS
|
||||||
array(
|
register_post_type(
|
||||||
'labels' => array(
|
'conseils',
|
||||||
'name' => __('Conseils', 'homegrade-theme__texte-backoffice'),
|
array(
|
||||||
'singular_name' => __('Conseil', 'homegrade-theme__texte-backoffice')
|
'labels' => array(
|
||||||
),
|
'name' => __('Conseils', 'homegrade-theme__texte-backoffice'),
|
||||||
'template' => [
|
'singular_name' => __('Conseil', 'homegrade-theme__texte-backoffice')
|
||||||
array('homegrade-content-blocks/chapter-header'),
|
),
|
||||||
array('core/paragraph', ['placeholder' => 'Add truc Description…',]),
|
'template' => [
|
||||||
],
|
array('homegrade-content-blocks/chapter-header'),
|
||||||
'hierarchical' => true,
|
array('core/paragraph', ['placeholder' => 'Add truc Description…',]),
|
||||||
'public' => true,
|
],
|
||||||
'has_archive' => false,
|
'hierarchical' => true,
|
||||||
'show_in_rest' => true,
|
'public' => true,
|
||||||
'menu_icon' => 'dashicons-pressthis',
|
'has_archive' => false,
|
||||||
'menu_position' => 2,
|
'show_in_rest' => true,
|
||||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
'menu_icon' => 'dashicons-pressthis',
|
||||||
|
'menu_position' => 2,
|
||||||
// 'supports' => array('title', 'custom-fields', 'editor'),
|
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
||||||
)
|
|
||||||
);
|
// 'supports' => array('title', 'custom-fields', 'editor'),
|
||||||
|
)
|
||||||
// **** BROCHURES
|
);
|
||||||
register_post_type(
|
|
||||||
'brochures',
|
// **** BROCHURES
|
||||||
array(
|
register_post_type(
|
||||||
'labels' => array(
|
'brochures',
|
||||||
'name' => __('Brochures', 'homegrade-theme__texte-backoffice'),
|
array(
|
||||||
'singular_name' => __('Brochure', 'homegrade-theme__texte-backoffice')
|
'labels' => array(
|
||||||
),
|
'name' => __('Brochures', 'homegrade-theme__texte-backoffice'),
|
||||||
'hierarchical' => true,
|
'singular_name' => __('Brochure', 'homegrade-theme__texte-backoffice')
|
||||||
'show_in_rest' => true,
|
),
|
||||||
'public' => true,
|
'hierarchical' => true,
|
||||||
'has_archive' => false,
|
'show_in_rest' => true,
|
||||||
'menu_icon' => 'dashicons-book',
|
'public' => true,
|
||||||
'menu_position' => 2,
|
'has_archive' => false,
|
||||||
'position' => 2,
|
'menu_icon' => 'dashicons-book',
|
||||||
'supports' => array('custom-fields', 'page-attributes', 'title'),
|
'menu_position' => 2,
|
||||||
)
|
'position' => 2,
|
||||||
);
|
'supports' => array('custom-fields', 'page-attributes', 'title'),
|
||||||
|
)
|
||||||
// **** QUESTIONS
|
);
|
||||||
register_post_type(
|
|
||||||
'questions',
|
// **** QUESTIONS
|
||||||
array(
|
register_post_type(
|
||||||
'labels' => array(
|
'questions',
|
||||||
'name' => __('Questions', 'homegrade-theme__texte-backoffice'),
|
array(
|
||||||
'singular_name' => __('Question', 'homegrade-theme__texte-backoffice')
|
'labels' => array(
|
||||||
),
|
'name' => __('Questions', 'homegrade-theme__texte-backoffice'),
|
||||||
'public' => true,
|
'singular_name' => __('Question', 'homegrade-theme__texte-backoffice')
|
||||||
'has_archive' => false,
|
),
|
||||||
'show_in_rest' => true,
|
'public' => true,
|
||||||
'menu_icon' => 'dashicons-editor-help',
|
'has_archive' => false,
|
||||||
'menu_position' => 2.1,
|
'show_in_rest' => true,
|
||||||
'supports' => array('title', 'custom-fields', 'editor', 'excerpt', 'revisions'),
|
'menu_icon' => 'dashicons-editor-help',
|
||||||
|
'menu_position' => 2.1,
|
||||||
// 'rewrite' => array('slug' => 'questions'),
|
'supports' => array('title', 'custom-fields', 'editor', 'excerpt', 'revisions'),
|
||||||
// 'rewrite' => array('slug' => 'questions/%thematiques%'),
|
|
||||||
)
|
// 'rewrite' => array('slug' => 'questions'),
|
||||||
);
|
// 'rewrite' => array('slug' => 'questions/%thematiques%'),
|
||||||
|
)
|
||||||
// **** FICHES-INFOS
|
);
|
||||||
register_post_type(
|
|
||||||
'fiches-infos',
|
// **** FICHES-INFOS
|
||||||
array(
|
register_post_type(
|
||||||
'labels' => array(
|
'fiches-infos',
|
||||||
'name' => __('Fiches info', 'homegrade-theme__texte-backoffice'),
|
array(
|
||||||
'singular_name' => __('Fiches Info', 'homegrade-theme__texte-backoffice')
|
'labels' => array(
|
||||||
),
|
'name' => __('Fiches info', 'homegrade-theme__texte-backoffice'),
|
||||||
'public' => true,
|
'singular_name' => __('Fiches Info', 'homegrade-theme__texte-backoffice')
|
||||||
'has_archive' => false,
|
),
|
||||||
'show_in_rest' => true,
|
'public' => true,
|
||||||
'menu_icon' => 'dashicons-info-outline',
|
'has_archive' => false,
|
||||||
'menu_position' => 2.1,
|
'show_in_rest' => true,
|
||||||
'supports' => array('title', 'custom-fields'),
|
'menu_icon' => 'dashicons-info-outline',
|
||||||
)
|
'menu_position' => 2.1,
|
||||||
);
|
'supports' => array('title', 'custom-fields'),
|
||||||
|
)
|
||||||
// **** VOCABULAIRE
|
);
|
||||||
register_post_type(
|
|
||||||
'vocabulaire',
|
// **** VOCABULAIRE
|
||||||
array(
|
register_post_type(
|
||||||
'labels' => array(
|
'vocabulaire',
|
||||||
'name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice'),
|
array(
|
||||||
'singular_name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice')
|
'labels' => array(
|
||||||
),
|
'name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice'),
|
||||||
'public' => true,
|
'singular_name' => __('Vocabulaire', 'homegrade-theme__texte-backoffice')
|
||||||
'has_archive' => true,
|
),
|
||||||
'show_in_rest' => true,
|
'public' => true,
|
||||||
'menu_icon' => 'dashicons-testimonial',
|
'has_archive' => true,
|
||||||
'menu_position' => 5.1,
|
'show_in_rest' => true,
|
||||||
'supports' => array('title', 'custom-fields'),
|
'menu_icon' => 'dashicons-testimonial',
|
||||||
)
|
'menu_position' => 5.1,
|
||||||
);
|
'supports' => array('title', 'custom-fields'),
|
||||||
|
)
|
||||||
// **** JOBS
|
);
|
||||||
register_post_type(
|
|
||||||
'jobs',
|
// **** JOBS
|
||||||
array(
|
register_post_type(
|
||||||
'labels' => array(
|
'jobs',
|
||||||
'name' => __('Jobs', 'homegrade-theme__texte-backoffice'),
|
array(
|
||||||
'singular_name' => __('Job', 'homegrade-theme__texte-backoffice')
|
'labels' => array(
|
||||||
),
|
'name' => __('Jobs', 'homegrade-theme__texte-backoffice'),
|
||||||
'rewrite' => array('slug' => 'job'),
|
'singular_name' => __('Job', 'homegrade-theme__texte-backoffice')
|
||||||
'public' => true,
|
),
|
||||||
'has_archive' => true,
|
'rewrite' => array('slug' => 'job'),
|
||||||
'show_in_rest' => true,
|
'public' => true,
|
||||||
'menu_icon' => 'dashicons-id-alt',
|
'has_archive' => true,
|
||||||
'menu_position' => 5.1,
|
'show_in_rest' => true,
|
||||||
'supports' => array('title', 'editor', 'custom-fields', 'page-attributes'),
|
'menu_icon' => 'dashicons-id-alt',
|
||||||
|
'menu_position' => 5.1,
|
||||||
)
|
'supports' => array('title', 'editor', 'custom-fields', 'page-attributes'),
|
||||||
);
|
|
||||||
|
)
|
||||||
// **** VIDEOS / WEBINAIRES
|
);
|
||||||
register_post_type(
|
|
||||||
'videos-webinaires',
|
// **** VIDEOS / WEBINAIRES
|
||||||
array(
|
register_post_type(
|
||||||
'labels' => array(
|
'videos-webinaires',
|
||||||
'name' => __('Webinaires', 'homegrade-theme__texte-backoffice'),
|
array(
|
||||||
'singular_name' => __('Webinaire', 'homegrade-theme__texte-backoffice')
|
'labels' => array(
|
||||||
),
|
'name' => __('Webinaires', 'homegrade-theme__texte-backoffice'),
|
||||||
'public' => true,
|
'singular_name' => __('Webinaire', 'homegrade-theme__texte-backoffice')
|
||||||
'has_archive' => true,
|
),
|
||||||
'show_in_rest' => true,
|
'public' => true,
|
||||||
'menu_icon' => 'dashicons-video-alt2',
|
'has_archive' => true,
|
||||||
'menu_position' => 5.1,
|
'show_in_rest' => true,
|
||||||
'supports' => array('title', 'custom-fields'),
|
'menu_icon' => 'dashicons-video-alt2',
|
||||||
'supports' => array('title', 'custom-fields', 'excerpt', 'thumbnail'),
|
'menu_position' => 5.1,
|
||||||
|
'supports' => array('title', 'custom-fields'),
|
||||||
)
|
'supports' => array('title', 'custom-fields', 'excerpt', 'thumbnail'),
|
||||||
);
|
|
||||||
|
)
|
||||||
// **** VIDEOS / WEBINAIRES
|
);
|
||||||
register_post_type(
|
|
||||||
'parcours',
|
// **** VIDEOS / WEBINAIRES
|
||||||
array(
|
register_post_type(
|
||||||
'labels' => array(
|
'parcours',
|
||||||
'name' => __('Parcours', 'homegrade-theme__texte-backoffice'),
|
array(
|
||||||
'singular_name' => __('Parcours', 'homegrade-theme__texte-backoffice')
|
'labels' => array(
|
||||||
),
|
'name' => __('Parcours', 'homegrade-theme__texte-backoffice'),
|
||||||
'public' => true,
|
'singular_name' => __('Parcours', 'homegrade-theme__texte-backoffice')
|
||||||
'has_archive' => true,
|
),
|
||||||
'hierarchical' => true,
|
'public' => true,
|
||||||
'show_in_rest' => true,
|
'has_archive' => true,
|
||||||
'menu_icon' => 'dashicons-forms',
|
'hierarchical' => true,
|
||||||
'supports' => array('title', 'custom-fields'),
|
'show_in_rest' => true,
|
||||||
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
'menu_icon' => 'dashicons-forms',
|
||||||
|
'supports' => array('title', 'custom-fields'),
|
||||||
)
|
'supports' => array('title', 'editor', 'page-attributes', 'thumbnail', 'revisions', 'excerpt'),
|
||||||
);
|
|
||||||
}
|
)
|
||||||
|
);
|
||||||
add_action('init', 'create_posttype');
|
}
|
||||||
|
|
||||||
|
add_action('init', 'create_posttype');
|
||||||
|
|
|
||||||
|
|
@ -196,8 +196,8 @@ function build_page_chapter_index($blocks)
|
||||||
if ($block['blockName'] == 'homegrade-content-blocks/content-heading' && isset($block['attrs']['title']) && isset($block['attrs']['headingLevel']) && $block['attrs']['headingLevel'] == "h2") {
|
if ($block['blockName'] == 'homegrade-content-blocks/content-heading' && isset($block['attrs']['title']) && isset($block['attrs']['headingLevel']) && $block['attrs']['headingLevel'] == "h2") {
|
||||||
array_push($chapterBlockIndex, [
|
array_push($chapterBlockIndex, [
|
||||||
'block-type' => $block['blockName'],
|
'block-type' => $block['blockName'],
|
||||||
'anchor' => "#" . strip_tags($block['attrs']['idName']),
|
'anchor' => "#" . esc_html($block['attrs']['idName']),
|
||||||
'title' => strip_tags($block['attrs']['title']),
|
'title' => esc_html($block['attrs']['title']),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if ($block['blockName'] == 'homegrade-content-blocks/chapitrage-thematique') {
|
if ($block['blockName'] == 'homegrade-content-blocks/chapitrage-thematique') {
|
||||||
|
|
|
||||||
15
package.json
15
package.json
|
|
@ -1,15 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "tailpress",
|
"name": "Homegrade_Theme",
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"description": "Boilerplate WordPress theme with Tailwind CSS.",
|
"description": "Homegrade Theme",
|
||||||
"author": "Jeffrey van Rossum",
|
"author": "Deligraph — Antoine Martinon",
|
||||||
"repository": {
|
"author_uri": "https://deligraph.be/",
|
||||||
"type": "git",
|
"text_domain": "homegrade-theme",
|
||||||
"url": "https://github.com/jeffreyvr/tailpress"
|
|
||||||
},
|
|
||||||
"theme_uri": "https://github.com/jeffreyvr/tailpress",
|
|
||||||
"author_uri": "https://vanrossum.dev",
|
|
||||||
"text_domain": "tailpress",
|
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"production:css-app": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss --minify",
|
"production:css-app": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/app.css -o ./css/app.css --postcss --minify",
|
||||||
|
|
|
||||||
|
|
@ -224,22 +224,3 @@
|
||||||
@apply bg-patrimoine-sante-securite;
|
@apply bg-patrimoine-sante-securite;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ol {
|
|
||||||
@apply list-decimal list-inside;
|
|
||||||
|
|
||||||
/* font-family: 'Railway', sans-serif; */
|
|
||||||
li {
|
|
||||||
list-style-type: decimal !important;
|
|
||||||
list-style-position: inside !important;
|
|
||||||
position: relative !important;
|
|
||||||
padding-left: 1.5em !important;
|
|
||||||
}
|
|
||||||
li:marker {
|
|
||||||
position: absolute !important;
|
|
||||||
left: 0 !important;
|
|
||||||
}
|
|
||||||
.block-editor-rich-text__editable {
|
|
||||||
display: inline-block !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,10 @@
|
||||||
@import './components/thematiques-faq-filters.css';
|
@import './components/thematiques-faq-filters.css';
|
||||||
@import './components/checkboxes.css';
|
@import './components/checkboxes.css';
|
||||||
@import './components/search-results.css';
|
@import './components/search-results.css';
|
||||||
|
@import './components/side-card.css';
|
||||||
@import './components/accordeons.css';
|
@import './components/accordeons.css';
|
||||||
@import './components/page-scroller.css';
|
@import './components/page-scroller.css';
|
||||||
|
@import './components/informative-message.css';
|
||||||
@import './components/previous-next-posts.css';
|
@import './components/previous-next-posts.css';
|
||||||
@import './components/forms/field-order-publications.css';
|
@import './components/forms/field-order-publications.css';
|
||||||
@import './components/forms/field-homegrade-rating.css';
|
@import './components/forms/field-homegrade-rating.css';
|
||||||
|
|
@ -121,6 +123,7 @@
|
||||||
@import './blocks/page-card.css';
|
@import './blocks/page-card.css';
|
||||||
@import './blocks/lightbox-gallery.css';
|
@import './blocks/lightbox-gallery.css';
|
||||||
@import './blocks/explainer-screen.css';
|
@import './blocks/explainer-screen.css';
|
||||||
|
@import './blocks/cta-slim.css';
|
||||||
|
|
||||||
/* Home */
|
/* Home */
|
||||||
@import './blocks/home-header.css';
|
@import './blocks/home-header.css';
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ main
|
||||||
a[target='_blank']:not([href*='homegrade\.local']):not([href*='homegrade\.brussels']):not(
|
a[target='_blank']:not([href*='homegrade\.local']):not([href*='homegrade\.brussels']):not(
|
||||||
:has(img)
|
:has(img)
|
||||||
) {
|
) {
|
||||||
&:not(.cta--primary, .cta--secondary, .cta--button, .wp-block-button__link) {
|
&:not(.cta--primary, .cta--secondary, .cta--button, .share-link, .wp-block-button__link) {
|
||||||
@apply inline items-center;
|
@apply inline items-center;
|
||||||
@apply px-2 py-1 first-letter:text-primary underline font-bold relative rounded-md;
|
@apply px-2 py-1 first-letter:text-primary underline font-bold relative rounded-md;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,3 +44,9 @@
|
||||||
margin-bottom: unset;
|
margin-bottom: unset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.block-content-page-header {
|
||||||
|
.homegrade-blocks-cta-slim + .homegrade-blocks-shortcuts {
|
||||||
|
@apply mt-12;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
14
resources/css/blocks/cta-slim.css
Normal file
14
resources/css/blocks/cta-slim.css
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
.homegrade-blocks-cta-slim {
|
||||||
|
@apply flex items-center font-bold pt-2 w-fit rounded-md;
|
||||||
|
&:after {
|
||||||
|
@apply ml-2;
|
||||||
|
transition: transform 0.2s ease-in-out;
|
||||||
|
/* @apply content-[''] w-4 h-4 bg-green-400 inline-block; */
|
||||||
|
content: url('../resources/img/graphic-assets/chevron-next.svg');
|
||||||
|
}
|
||||||
|
&:hover:after {
|
||||||
|
@apply translate-x-1;
|
||||||
|
transition: transform 0.2s ease-in-out;
|
||||||
|
/* @apply translate-x-2; */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -81,3 +81,87 @@
|
||||||
pt-16;
|
pt-16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swiper-content {
|
||||||
|
@apply lg:px-24 relative max-w-screen-2xl mx-auto;
|
||||||
|
/* @apply bg-fuchsia-100; */
|
||||||
|
}
|
||||||
|
.swiper-container {
|
||||||
|
height: auto;
|
||||||
|
@apply px-3 overflow-hidden;
|
||||||
|
/* @apply bg-yellow-50; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-wrapper {
|
||||||
|
@apply pt-24 pb-16 w-full flex-col lg:flex-row gap-y-20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-slide {
|
||||||
|
@apply h-auto;
|
||||||
|
.card-thematique {
|
||||||
|
@apply h-full;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.thematique-button-next,
|
||||||
|
.thematique-button-prev {
|
||||||
|
@apply absolute top-1/2 z-50 opacity-80 hidden lg:block;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
&:hover,
|
||||||
|
&:focus-visible {
|
||||||
|
@apply opacity-100;
|
||||||
|
filter: invert(13%) sepia(71%) saturate(4425%) hue-rotate(338deg) brightness(109%)
|
||||||
|
contrast(117%);
|
||||||
|
}
|
||||||
|
&:focus-visible {
|
||||||
|
@apply rounded-full;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.thematique-button-next {
|
||||||
|
@apply right-0 transform;
|
||||||
|
}
|
||||||
|
.thematique-button-prev {
|
||||||
|
@apply left-0;
|
||||||
|
}
|
||||||
|
.swiper-pagination {
|
||||||
|
@apply hidden lg:block;
|
||||||
|
}
|
||||||
|
.swiper-pagination-bullet {
|
||||||
|
@apply w-5 h-5 !mx-2 opacity-100 bg-white !border-2 !border-solid border-black;
|
||||||
|
}
|
||||||
|
.swiper-pagination-bullet:focus-visible {
|
||||||
|
outline-offset: 4px;
|
||||||
|
}
|
||||||
|
.swiper-pagination-bullet-active {
|
||||||
|
@apply bg-secondary !border-secondary opacity-100;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .swiper-slide {
|
||||||
|
background-color: red !important;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 18px;
|
||||||
|
background: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper-slide img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
} */
|
||||||
|
.section-show-thematiques {
|
||||||
|
@apply pt-8 pb-8 px-8 md:px-16;
|
||||||
|
.thematiques-container {
|
||||||
|
@apply grid
|
||||||
|
grid-cols-3
|
||||||
|
gap-8
|
||||||
|
gap-y-32
|
||||||
|
max-w-screen-xl
|
||||||
|
mx-auto
|
||||||
|
pt-16;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@
|
||||||
@apply bg-primary text-white
|
@apply bg-primary text-white
|
||||||
hover:bg-primary-hover;
|
hover:bg-primary-hover;
|
||||||
}
|
}
|
||||||
|
&--patrimoine {
|
||||||
|
@apply !bg-patrimoine-sante-securite !text-white;
|
||||||
|
}
|
||||||
&--white {
|
&--white {
|
||||||
@apply bg-white text-secondary
|
@apply bg-white text-secondary
|
||||||
hover:bg-primary-hover;
|
hover:bg-primary-hover;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
form:not(.metabox-location-side):not(.metabox-location-normal):not(
|
form:not(.metabox-location-side):not(.metabox-location-normal):not(
|
||||||
.metabox-location-advanced,
|
.metabox-location-advanced,
|
||||||
.search-module__search-form
|
.search-module__search-form,
|
||||||
|
.metier-patrimoine-searchform
|
||||||
) {
|
) {
|
||||||
--secondary: #df1e1e;
|
--secondary: #df1e1e;
|
||||||
--secondary-darker: #bd1515;
|
--secondary-darker: #bd1515;
|
||||||
|
|
|
||||||
|
|
@ -38,15 +38,32 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.extra_details {
|
.extra_details {
|
||||||
@apply flex flex-wrap items-center justify-between;
|
@apply flex flex-wrap items-center justify-between gap-4;
|
||||||
|
|
||||||
|
.sitemap-btn,
|
||||||
|
.metiers-patrimoine-btn {
|
||||||
|
@apply !py-3 !px-5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metiers-patrimoine-btn {
|
||||||
|
@apply flex items-center justify-center;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
@apply w-6 h-6 mr-2 block bg-contain bg-center bg-no-repeat content-[''];
|
||||||
|
background-image: url('../resources/img/pictogrammes/Homegrade_artisans-patrimoine.svg');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.social-networks {
|
.social-networks {
|
||||||
@apply flex gap-4;
|
@apply flex gap-4 ml-auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&__partenaires {
|
&__partenaires {
|
||||||
@apply flex flex-wrap col-span-4 md:col-span-2 justify-center items-center gap-12;
|
@apply flex flex-wrap col-span-4 justify-center items-center gap-x-12;
|
||||||
|
.content-intertitle {
|
||||||
|
@apply w-full text-center;
|
||||||
|
}
|
||||||
a img {
|
a img {
|
||||||
@apply inline-block;
|
@apply inline-block;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -182,11 +182,64 @@
|
||||||
@apply hidden;
|
@apply hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.wpml-ls-item-nl {
|
/* .wpml-ls-legacy-list-horizontal {
|
||||||
@apply xl:ml-8;
|
@apply p-0;
|
||||||
|
} */
|
||||||
|
.wpml-ls {
|
||||||
|
@apply !p-0;
|
||||||
}
|
}
|
||||||
|
/* .wpml-ls-item-nl {
|
||||||
|
@apply xl:ml-8;
|
||||||
|
} */
|
||||||
|
|
||||||
|
.wpml-ls-legacy-dropdown-click {
|
||||||
|
@apply !w-fit mt-4 lg:mt-0;
|
||||||
|
/* margin-left: -10px !important; */
|
||||||
|
|
||||||
|
ul {
|
||||||
|
@apply border-none lg:!px-2;
|
||||||
|
}
|
||||||
|
ul.wpml-ls-sub-menu {
|
||||||
|
@apply !pb-2 bg-primary static lg:absolute;
|
||||||
|
|
||||||
|
@media screen and (max-width: 960px) {
|
||||||
|
@apply !visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
@apply !bg-transparent !text-white border-none;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
@apply rounded-lg font-bold;
|
||||||
|
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||||
|
}
|
||||||
|
a.wpml-ls-item-toggle {
|
||||||
|
@apply lg:!px-5;
|
||||||
|
}
|
||||||
|
a.wpml-ls-item-toggle:after {
|
||||||
|
@apply !content-none lg:!content-[''];
|
||||||
|
right: 0px;
|
||||||
|
display: inline-block;
|
||||||
|
transition: all 0.3s ease-out;
|
||||||
|
border: unset;
|
||||||
|
border-bottom: 2px solid white;
|
||||||
|
border-right: 2px solid white;
|
||||||
|
height: 8px;
|
||||||
|
width: 8px;
|
||||||
|
/* margin-left: 10px;
|
||||||
|
margin-left: 20px; */
|
||||||
|
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.wpml-ls-item {
|
.wpml-ls-item {
|
||||||
@apply px-1 inline-block mb-3 lg:mb-0;
|
@apply bg-transparent text-white;
|
||||||
|
}
|
||||||
|
/* OLD LANGUAGE SELECTOR LOOK */
|
||||||
|
/* .wpml-ls-item {
|
||||||
|
@apply !px-1 inline-block mb-3 lg:mb-0;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@apply !rounded-full h-10 w-10 border-2 border-white p-0 !flex justify-center items-center font-semibold text-sm;
|
@apply !rounded-full h-10 w-10 border-2 border-white p-0 !flex justify-center items-center font-semibold text-sm;
|
||||||
|
|
@ -197,15 +250,15 @@
|
||||||
a:hover {
|
a:hover {
|
||||||
@apply !bg-white text-primary font-bold;
|
@apply !bg-white text-primary font-bold;
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
.wpml-ls-current-language {
|
/* .wpml-ls-current-language {
|
||||||
a {
|
a {
|
||||||
@apply bg-white text-primary font-bold;
|
@apply bg-white text-primary font-bold;
|
||||||
}
|
}
|
||||||
a:focus-visible {
|
a:focus-visible {
|
||||||
@apply !bg-white text-primary font-bold;
|
@apply !bg-white text-primary font-bold;
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-homegrade--footer {
|
.menu-homegrade--footer {
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@ export default function menuInit() {
|
||||||
HANDLE SEARCH
|
HANDLE SEARCH
|
||||||
-----------------------------------------------------------*/
|
-----------------------------------------------------------*/
|
||||||
function isSearchOpen() {
|
function isSearchOpen() {
|
||||||
|
if (!searchModule) return null;
|
||||||
// IF CLOSED
|
// IF CLOSED
|
||||||
if (
|
if (
|
||||||
searchModule.getAttribute('mobile-closed') != null &&
|
searchModule.getAttribute('mobile-closed') != null &&
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
<input class="search-module__search-form__input" type="text" name="s" id="search" value="<?php the_search_query(); ?>" placeholder="<?php echo __('Rechercher dans le site. Taper vos mots-clés ici', 'homegrade-theme__texte-fonctionnel') ?>" />
|
<input class="search-module__search-form__input" type="text" name="s" id="search" value="<?php the_search_query(); ?>" placeholder="<?php echo __('Rechercher dans le site. Taper vos mots-clés ici', 'homegrade-theme__texte-fonctionnel') ?>" />
|
||||||
|
|
||||||
|
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<span><?php echo __('Rechercher', 'homegrade-theme__texte-fonctionnel') ?></span>
|
<span><?php echo __('Rechercher', 'homegrade-theme__texte-fonctionnel') ?></span>
|
||||||
<img class="search_icon" src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/search-icon.svg' alt=''>
|
<img class="search_icon" src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/search-icon.svg' alt=''>
|
||||||
|
|
|
||||||
|
|
@ -1,125 +1,127 @@
|
||||||
<?php
|
<?php
|
||||||
get_header();
|
get_header();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<?php if (have_posts()) : ?>
|
<?php if (have_posts()) : ?>
|
||||||
<?php while (have_posts()) : the_post(); ?>
|
<?php while (have_posts()) : the_post(); ?>
|
||||||
<?php
|
<?php
|
||||||
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
$currentThematique = get_the_terms(get_the_ID(), 'thematiques')[0];
|
||||||
$mainThematique = getMainThematique($currentThematique);
|
$mainThematique = getMainThematique($currentThematique);
|
||||||
$thematiqueColorSlug = $mainThematique->slug;
|
$thematiqueColorSlug = $mainThematique->slug;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="post-conseil-page-container <?php echo $thematiqueColorSlug ? "post-conseil-page--" . $thematiqueColorSlug : "" ?>">
|
<div class="post-conseil-page-container <?php echo $thematiqueColorSlug ? "post-conseil-page--" . $thematiqueColorSlug : "" ?>">
|
||||||
<nav class=" breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "homegrade-theme__texte-fonctionnel") ?>">
|
<nav class=" breadcrumbs_navigation" aria-label="<?php echo __("Vous êtes ici", "homegrade-theme__texte-fonctionnel") ?>">
|
||||||
<?php
|
<?php
|
||||||
$archiveConseils = get_page_by_template('template-archive-conseils.php')[0];
|
$archiveConseils = get_page_by_template('template-archive-conseils.php')[0];
|
||||||
?>
|
?>
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "homegrade-theme__texte-fonctionnel") ?>">
|
<a href="<?php echo home_url() ?>" title="<?php echo __("Accueil", "homegrade-theme__texte-fonctionnel") ?>">
|
||||||
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
<img src="<?php echo get_template_directory_uri() . "/resources/img/pictogrammes/icon_house_dark.svg" ?>" alt="">
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="<?php echo get_post_permalink($archiveConseils) ?>"><?php echo $archiveConseils->post_title ?></a></li>
|
<li><a href="<?php echo get_post_permalink($archiveConseils) ?>"><?php echo $archiveConseils->post_title ?></a></li>
|
||||||
<?php if ($mainThematique != $currentThematique) : ?>
|
<?php if ($mainThematique != $currentThematique) : ?>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'conseils', // the post type
|
'post_type' => 'conseils', // the post type
|
||||||
'tax_query' => array(
|
'tax_query' => array(
|
||||||
array(
|
array(
|
||||||
'taxonomy' => 'thematiques', // the custom vocabulary
|
'taxonomy' => 'thematiques', // the custom vocabulary
|
||||||
'field' => 'term_id', // term_id, slug or name
|
'field' => 'term_id', // term_id, slug or name
|
||||||
'terms' => array($mainThematique->term_id),
|
'terms' => array($mainThematique->term_id),
|
||||||
'include_children' => false,
|
'include_children' => false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
$mainThematiqueRelatedConseil = get_posts($args)[0] ?? null;
|
$mainThematiqueRelatedConseil = get_posts($args)[0] ?? null;
|
||||||
?>
|
?>
|
||||||
<li><a href="<?php echo get_post_permalink($mainThematiqueRelatedConseil) ?>"><?php echo $mainThematique->name ?></a></li>
|
<li><a href="<?php echo get_post_permalink($mainThematiqueRelatedConseil) ?>"><?php echo $mainThematique->name ?></a></li>
|
||||||
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<li><a href="<?php echo the_permalink() ?>" aria-current="location" aria-disabled="true"><?php echo $currentThematique->name ?></a></li>
|
<li><a href="<?php echo the_permalink() ?>" aria-current="location" aria-disabled="true"><?php echo $currentThematique->name ?></a></li>
|
||||||
|
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
<?php /* -------
|
<?php /* -------
|
||||||
CHAPTER HEADER
|
CHAPTER HEADER
|
||||||
---------------*/ ?>
|
---------------*/ ?>
|
||||||
<?php
|
<?php
|
||||||
$blocks = parse_blocks($post->post_content);
|
$blocks = parse_blocks($post->post_content);
|
||||||
$chapterBlockIndex = build_page_chapter_index($blocks); // see utilities.php
|
$chapterBlockIndex = build_page_chapter_index($blocks); // see utilities.php
|
||||||
$queryArgs = array(
|
$queryArgs = array(
|
||||||
'post_type' => 'brochures',
|
'post_type' => 'brochures',
|
||||||
'posts_per_page' => 1,
|
'posts_per_page' => 1,
|
||||||
'status' => 'publish',
|
'status' => 'publish',
|
||||||
'tax_query' => array(
|
'tax_query' => array(
|
||||||
array(
|
array(
|
||||||
'taxonomy' => 'thematiques',
|
'taxonomy' => 'thematiques',
|
||||||
'field' => 'term_id',
|
'field' => 'term_id',
|
||||||
'terms' => $currentThematique->term_id,
|
'terms' => $currentThematique->term_id,
|
||||||
'include_children' => false,
|
'include_children' => false,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$relatedBrochuresPosts = get_posts($queryArgs);
|
$relatedBrochuresPosts = get_posts($queryArgs);
|
||||||
$relatedBrochure = get_field('brochure_pdf', $relatedBrochuresPosts[0]->ID) ?? null;
|
$relatedBrochure = get_field('brochure_pdf', $relatedBrochuresPosts[0]->ID) ?? null;
|
||||||
|
|
||||||
|
$hasManualDocument = get_field('manual_source_document') ?? null;
|
||||||
$hasManualDocument = get_field('manual_source_document') ?? null;
|
$manualSrcDocument = get_field('manual_document_link');
|
||||||
$manualSrcDocument = get_field('manual_document_link');
|
|
||||||
|
$relatedDocumentUrl = ($hasManualDocument && $manualSrcDocument && $manualSrcDocument['source_document']) ? $manualSrcDocument['source_document']['url'] : $relatedBrochure['url'] ?? null;
|
||||||
$relatedDocumentUrl = ($hasManualDocument && $manualSrcDocument && $manualSrcDocument['source_document']) ? $manualSrcDocument['source_document']['url'] : $relatedBrochure['url'] ?? null;
|
$relatedDocumentCtaTitle = ($hasManualDocument && $manualSrcDocument && $manualSrcDocument['button_title']) ? $manualSrcDocument['button_title'] : __("Télécharger la brochure ", "homegrade-theme__texte-fonctionnel");
|
||||||
$relatedDocumentCtaTitle = ($hasManualDocument && $manualSrcDocument && $manualSrcDocument['button_title']) ? $manualSrcDocument['button_title'] : __("Télécharger la brochure ", "homegrade-theme__texte-fonctionnel");
|
|
||||||
|
get_template_part('template-components/post-conseils/chapter-header', null, array(
|
||||||
get_template_part('template-components/post-conseils/chapter-header', null, array(
|
'postID' => get_the_ID(),
|
||||||
'postID' => get_the_ID(),
|
'subtitle' => __("Les conseillers Homegrade vous guident", "homegrade-theme__texte-fonctionnel"),
|
||||||
'subtitle' => __("Les conseillers Homegrade vous guident", "homegrade-theme__texte-fonctionnel"),
|
'title' => get_the_title(get_the_ID()),
|
||||||
'title' => get_the_title(get_the_ID()),
|
'ctaUrl' => $relatedDocumentUrl,
|
||||||
'ctaUrl' => $relatedDocumentUrl,
|
'ctaTitle' => $relatedDocumentCtaTitle,
|
||||||
'ctaTitle' => $relatedDocumentCtaTitle,
|
'hasInfoCapsule' => true,
|
||||||
'hasInfoCapsule' => true,
|
));
|
||||||
)); ?>
|
|
||||||
<?php /* -------
|
?>
|
||||||
CONSEIL
|
|
||||||
---------------*/ ?>
|
|
||||||
<div class=" conseils_wrapper">
|
|
||||||
<!-- CHAPTER INDEX -->
|
<?php /* -------
|
||||||
<aside class="chapter_index">
|
CONSEIL
|
||||||
<?php if ($chapterBlockIndex) : ?>
|
---------------*/ ?>
|
||||||
<div class="chapter_index__titling">
|
<div class=" conseils_wrapper">
|
||||||
<div class="icon">
|
<!-- CHAPTER INDEX -->
|
||||||
<img src="<?php echo get_template_directory_uri() . '/resources/img/graphic-assets/icon-feather-menu.svg' ?>" alt="">
|
<aside>
|
||||||
</div>
|
<?php if ($chapterBlockIndex) {
|
||||||
<h2 class="chapter_index__title"> <?php echo __("Dans ce conseil", "homegrade-theme__texte-fonctionnel") ?> </h2>
|
get_template_part('template-components/post-conseils/chapter-index', null, array(
|
||||||
</div>
|
'chapterBlockIndex' => $chapterBlockIndex,
|
||||||
<ul class="chapter_index__list">
|
));
|
||||||
<div class="chapter_index__position-indicator"></div>
|
} ?>
|
||||||
<?php foreach ($chapterBlockIndex as $chapter) : ?>
|
|
||||||
<li class="chapter_index__link"><a href="<?php echo $chapter['anchor'] ?>"><?php echo $chapter['title'] ?></a></li>
|
<?php
|
||||||
<?php endforeach; ?>
|
if ($mainThematique->term_id == 59 || $mainThematique->term_id == 32) {
|
||||||
</ul>
|
get_template_part('template-components/post-conseils/find-artisan', null, array());
|
||||||
<?php endif; ?>
|
}
|
||||||
</aside>
|
?>
|
||||||
|
|
||||||
<!-- ARTICLE -->
|
</aside>
|
||||||
<article class="entry-content single-editor-content <?php echo $thematiqueColorSlug ? "entry-content--" . $thematiqueColorSlug : "" ?>">
|
|
||||||
<?php the_content() ?>
|
<!-- ARTICLE -->
|
||||||
</article>
|
<article class="entry-content single-editor-content <?php echo $thematiqueColorSlug ? "entry-content--" . $thematiqueColorSlug : "" ?>">
|
||||||
|
<?php the_content() ?>
|
||||||
|
</article>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php endwhile; ?>
|
</div>
|
||||||
<?php endif; ?>
|
</div>
|
||||||
|
<?php endwhile; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
get_footer();
|
|
||||||
|
<?php
|
||||||
|
get_footer();
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ get_header();
|
||||||
'taxonomy' => 'thematiques',
|
'taxonomy' => 'thematiques',
|
||||||
'field' => 'slug',
|
'field' => 'slug',
|
||||||
'terms' => $mainThematique->slug,
|
'terms' => $mainThematique->slug,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$relatedConseils = new WP_Query($args);
|
$relatedConseils = new WP_Query($args);
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ module.exports = {
|
||||||
md: '782px',
|
md: '782px',
|
||||||
lg: tailpress.theme('settings.layout.contentSize', theme),
|
lg: tailpress.theme('settings.layout.contentSize', theme),
|
||||||
xl: tailpress.theme('settings.layout.wideSize', theme),
|
xl: tailpress.theme('settings.layout.wideSize', theme),
|
||||||
'2xl': '1440px',
|
'2xl': '1441px',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [tailpress.tailwind],
|
plugins: [tailpress.tailwind],
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ $thematiqueColorSlug = $mainThematique->slug;
|
||||||
<?php
|
<?php
|
||||||
$currentPage = get_post();
|
$currentPage = get_post();
|
||||||
$parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null;
|
$parentPage = $currentPage->post_parent !== 0 ? get_post($currentPage->post_parent) : null;
|
||||||
$grandParentPage = $parentPage && $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
|
$grandParentPage = $parentPage->post_parent ? get_post($parentPage->post_parent) : null;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<ol>
|
<ol>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// switch_to_blog(1);
|
||||||
$menu_name = 'renovateur';
|
$menu_name = 'renovateur';
|
||||||
$locations = get_nav_menu_locations();
|
$locations = get_nav_menu_locations();
|
||||||
$menu = wp_get_nav_menu_object($locations[$menu_name]);
|
$menu = wp_get_nav_menu_object($locations[$menu_name]);
|
||||||
|
if ($menu->taxonomy !== 'nav_menu') die();
|
||||||
|
|
||||||
|
|
||||||
$menuitems = wp_get_nav_menu_items($menu->term_id, array('order' => 'DESC'));
|
$menuitems = wp_get_nav_menu_items($menu->term_id, array('order' => 'DESC'));
|
||||||
$logoID = get_theme_mod('custom_logo');
|
$logoID = get_theme_mod('custom_logo');
|
||||||
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
|
|
@ -153,7 +158,7 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<a href="<?php echo get_permalink($taxonomyRelatedPost->ID) ?>">
|
<a href="<?php echo "#" ?>">
|
||||||
<?php if ($cover) : ?>
|
<?php if ($cover) : ?>
|
||||||
<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; ?>
|
||||||
|
|
@ -216,4 +221,8 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
// get_template_part('template-components/header/search-module');
|
// get_template_part('template-components/header/search-module');
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// restore_current_blog();
|
||||||
|
?>
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
// switch_to_blog(1);
|
||||||
$logoID = get_theme_mod('custom_logo');
|
$logoID = get_theme_mod('custom_logo');
|
||||||
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
$logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
?>
|
?>
|
||||||
|
|
@ -36,4 +37,9 @@ $logoSRC = wp_get_attachment_image_src($logoID, 'full');
|
||||||
<?php
|
<?php
|
||||||
// get_template_part('template-components/header/search-module');
|
// get_template_part('template-components/header/search-module');
|
||||||
?>
|
?>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// restore_current_blog();
|
||||||
|
?>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
switch_to_blog(1);
|
||||||
?>
|
?>
|
||||||
<div id="search-module" class="search-module" mobile-closed aria-hidden role="search">
|
<div id="search-module" class="search-module" mobile-closed aria-hidden role="search">
|
||||||
<div class="search-module__wrapper-container">
|
<div class="search-module__wrapper-container">
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
$suggestions_posts = new WP_Query($args);
|
$suggestions_posts = new WP_Query($args);
|
||||||
?>
|
?>
|
||||||
<ul class="search-module__suggestions__navlist">
|
<ul class="search-module__suggestions__navlist">
|
||||||
|
|
||||||
<?php foreach ($suggestions_posts->posts as $post) : ?>
|
<?php foreach ($suggestions_posts->posts as $post) : ?>
|
||||||
<li class="suggestion-item">
|
<li class="suggestion-item">
|
||||||
<a href="<?php echo get_the_permalink($post->ID) ?>"><?php echo $post->post_title ?></a>
|
<a href="<?php echo get_the_permalink($post->ID) ?>"><?php echo $post->post_title ?></a>
|
||||||
|
|
@ -26,4 +25,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
restore_current_blog();
|
||||||
|
?>
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,12 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
|
||||||
"pageIcon" => $pageIcon,
|
"pageIcon" => $pageIcon,
|
||||||
"title" => get_the_title(get_queried_object_id()),
|
"title" => get_the_title(get_queried_object_id()),
|
||||||
"description" => __("Découvrez toutes nos publications et outils en ligne", "homegrade-theme__texte-fonctionnel"),
|
"description" => __("Découvrez toutes nos publications et outils en ligne", "homegrade-theme__texte-fonctionnel"),
|
||||||
|
"ctaSecondary" => array(
|
||||||
|
"title" => $receivePrintedPublicationsDatas['cta_title'] ?? null,
|
||||||
|
"url" => $receivePrintedPublicationsDatas['order_form_url'] ?? null,
|
||||||
|
"target" => "_blank",
|
||||||
|
"custom-class" => "paper-button",
|
||||||
|
),
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
@ -233,42 +239,15 @@ $total_posts_found = $brochuresPosts->found_posts + $fichesInfosPosts->found_pos
|
||||||
<!-- LOAD MORE -->
|
<!-- LOAD MORE -->
|
||||||
<button id="load-more-brochures" class="cta cta--button cta--outline cta--button cta--centered cta--load-more" data-publication-type="brochures"><?php echo __("Consulter plus de brochures", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></button>
|
<button id="load-more-brochures" class="cta cta--button cta--outline cta--button cta--centered cta--load-more" data-publication-type="brochures"><?php echo __("Consulter plus de brochures", "homegrade-theme__texte-fonctionnel__publications-archive-brochures") ?></button>
|
||||||
<?php wp_reset_postdata(); ?>
|
<?php wp_reset_postdata(); ?>
|
||||||
|
<?php /* ---------
|
||||||
|
DISTRIBUEZ PUBLICATIONS
|
||||||
|
-----------------*/ ?>
|
||||||
<?php
|
<?php
|
||||||
$sharePublications = get_field('section_share_publications', $current_page_id);
|
$sharePublications = get_field('section_share_publications', $current_page_id);
|
||||||
?>
|
?>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
/* -------------------------
|
|
||||||
DISTRIBUEZ PUBLICATIONS
|
|
||||||
-----------------------------*/
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
$receivePrintedPublicationsDatas['order_form_url'] ?? null
|
|
||||||
?>
|
|
||||||
<section class="distribuez-publications wp-block-homegrade-content-blocks-highlight homegrade-blocks-highlight homegrade-blocks-highlight--classic homegrade-blocks-highlight--has-illustration">
|
|
||||||
|
|
||||||
<div class="homegrade-blocks-highlight--has-illustration__content">
|
|
||||||
<div class="homegrade-blocks-highlight__titling ">
|
|
||||||
<div class="icon"><img decoding="async" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNi4wMTIiIGhlaWdodD0iMTUuOTk5IiB2aWV3Qm94PSIwIDAgMTYuMDEyIDE1Ljk5OSI+CiAgPGcgaWQ9Ikljb25fZmVhdGhlci1saW5rIiBkYXRhLW5hbWU9Ikljb24gZmVhdGhlci1saW5rIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMS45OTMgLTIuMDA3KSI+CiAgICA8cGF0aCBpZD0iVHJhY8OpXzE4NTU5IiBkYXRhLW5hbWU9IlRyYWPDqSAxODU1OSIgZD0iTTE1LDEwLjcwN2EzLjUsMy41LDAsMCwwLDUuMjguMzc4bDIuMS0yLjFBMy41LDMuNSwwLDEsMCwxNy40Myw0LjAzM2wtMS4yLDEuMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTYuNDAyIDApIiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBpZD0iVHJhY8OpXzE4NTYwIiBkYXRhLW5hbWU9IlRyYWPDqSAxODU2MCIgZD0iTTExLjQsMTQuOWEzLjUsMy41LDAsMCwwLTUuMjgtLjM3OGwtMi4xLDIuMUEzLjUsMy41LDAsMSwwLDguOTcsMjEuNTdsMS4yLTEuMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCAtNS41OSkiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8L2c+Cjwvc3ZnPgo=" alt=""></div>
|
|
||||||
<h3 class="homegrade-blocks-highlight__block-title"><?php echo $receivePrintedPublicationsDatas['title'] ?></h3>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="homegrade-blocks-highlight__content__innerblocks">
|
|
||||||
<p><?php echo $receivePrintedPublicationsDatas['description'] ?></p>
|
|
||||||
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="<?php echo $receivePrintedPublicationsDatas['order_form_url'] ?>" target="_blank" rel="noreferrer noopener"><?php echo $receivePrintedPublicationsDatas['cta_title'] ?></a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<img class="homegrade-blocks-highlight--has-illustration__illustration" decoding="async" src="<?php echo get_template_directory_uri() . "/resources/img/illustrations/homegrade_brochure-impression-domicile.svg" ?>" alt="">
|
|
||||||
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php /* -----------
|
<?php /* -----------
|
||||||
FICHES INFOS
|
FICHES INFOS
|
||||||
------------------*/ ?>
|
------------------*/ ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user