REFACTOR Importing dynamic fse compositionsfor soutenir and infolettre to increase flexibilty and simplify user modifications
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Antoine M 2026-03-03 17:19:05 +01:00
parent 6ee828e3db
commit d426369c14
5 changed files with 10 additions and 75 deletions

View File

@ -26,24 +26,11 @@ $current_post_type = get_post_type();
<!-- #### SOUTENIR #### -->
<?php
$composition_id = 988;
$soutenir_content = get_post_field('post_content', $composition_id);
<?php get_template_part('template-parts/compositions/soutenir'); ?>
if ($soutenir_content) {
echo do_blocks($soutenir_content);
}
?>
<!-- #### INFOLETTRE #### -->
<?php
$composition_id = 992;
$_infolettre_content = get_post_field('post_content', $composition_id);
if ($_infolettre_content) {
echo do_blocks($_infolettre_content);
}
?>
<?php get_template_part('template-parts/compositions/infolettre'); ?>
</main>
<?php

View File

@ -28,25 +28,12 @@
<?php get_template_part('template-parts/post-types/analyses-etudes/analyses-etudes-grid'); ?>
<!-- #### SOUTENIR #### -->
<?php
$composition_id = 988;
$soutenir_content = get_post_field('post_content', $composition_id);
<?php get_template_part('template-parts/compositions/soutenir'); ?>
if ($soutenir_content) {
echo do_blocks($soutenir_content);
}
?>
<!-- #### INFOLETTRE #### -->
<?php
$composition_id = 992;
$_infolettre_content = get_post_field('post_content', $composition_id);
if ($_infolettre_content) {
echo do_blocks($_infolettre_content);
}
<?php get_template_part('template-parts/compositions/infolettre'); ?>
?>
</main>

View File

@ -26,24 +26,11 @@ $current_post_type = get_post_type();
<!-- #### SOUTENIR #### -->
<?php
$composition_id = 988;
$soutenir_content = get_post_field('post_content', $composition_id);
<?php get_template_part('template-parts/compositions/soutenir'); ?>
if ($soutenir_content) {
echo do_blocks($soutenir_content);
}
?>
<!-- #### INFOLETTRE #### -->
<?php
$composition_id = 992;
$_infolettre_content = get_post_field('post_content', $composition_id);
if ($_infolettre_content) {
echo do_blocks($_infolettre_content);
}
?>
<?php get_template_part('template-parts/compositions/infolettre'); ?>
</main>
<?php

View File

@ -27,24 +27,11 @@ $current_post_type = get_post_type();
<!-- #### SOUTENIR #### -->
<?php
$composition_id = 988;
$soutenir_content = get_post_field('post_content', $composition_id);
<?php get_template_part('template-parts/compositions/soutenir'); ?>
if ($soutenir_content) {
echo do_blocks($soutenir_content);
}
?>
<!-- #### INFOLETTRE #### -->
<?php
$composition_id = 992;
$_infolettre_content = get_post_field('post_content', $composition_id);
if ($_infolettre_content) {
echo do_blocks($_infolettre_content);
}
?>
<?php get_template_part('template-parts/compositions/infolettre'); ?>
</main>
<?php

View File

@ -15,24 +15,11 @@ $current_post_type = get_post_type();
<?php get_template_part('template-parts/expositions/archive-latest-parutions', null, array()); ?>
<!-- #### SOUTENIR #### -->
<?php
$composition_id = 988;
$soutenir_content = get_post_field('post_content', $composition_id);
<?php get_template_part('template-parts/compositions/soutenir'); ?>
if ($soutenir_content) {
echo do_blocks($soutenir_content);
}
?>
<!-- #### INFOLETTRE #### -->
<?php
$composition_id = 992;
$_infolettre_content = get_post_field('post_content', $composition_id);
if ($_infolettre_content) {
echo do_blocks($_infolettre_content);
}
?>
<?php get_template_part('template-parts/compositions/infolettre'); ?>
</main>
<?php