fix(homepage): align shell with zibll and restore post stream
Move header-slider outside main, render fluid zones once, default the latest stream to plain posts by date, and cut dual-render/perf waste so published posts and hero/banner structure match the zibll contract.
This commit is contained in:
1 parent
8be4c5c123
commit
8f19384582
11 files changed
+223
-103
No files matched your search
@@ -21,7 +21,19 @@ if (class_exists('AKSRT_Settings') && !AKSRT_Settings::homepage_module_banner_en
|
||||
}
|
||||
|
||||
$banners = function_exists('aksrt_get_banners') ? aksrt_get_banners(8, 'banner') : [];
|
||||
if (empty($banners)) return;
|
||||
if (empty($banners)) {
|
||||
if (current_user_can('manage_options')) {
|
||||
echo '<div class="home-module home-module--banner home-module--banner-empty box-body">';
|
||||
echo '<p class="muted-2-color">' . esc_html__('No Banner slides found. Add banner slides in admin.', 'aksrt') . '</p>';
|
||||
if (function_exists('aksrt_render_admin_quick_link')) {
|
||||
echo '<div class="home-module__admin-tools">';
|
||||
aksrt_render_admin_quick_link('page-display/header-components', __('Header / Banner settings', 'aksrt'));
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
$cfg = get_query_var('aksrt_module_config', []);
|
||||
if (!is_array($cfg)) $cfg = [];
|
||||
@@ -41,9 +53,9 @@ $swiper_config = [
|
||||
'spaceBetween' => ($slider_cfg['space_between'] ?? 0),
|
||||
];
|
||||
?>
|
||||
<div class="home-module home-module--banner">
|
||||
<div class="banner-module">
|
||||
<div class="swiper banner-module__swiper" data-swiper-config="<?php echo esc_attr(wp_json_encode($swiper_config)); ?>">
|
||||
<div class="home-module home-module--banner slide-widget mb20">
|
||||
<div class="banner-module zib-slider">
|
||||
<div class="swiper new-swiper banner-module__swiper slide-widget-swiper" data-swiper-config="<?php echo esc_attr(wp_json_encode($swiper_config)); ?>">
|
||||
<div class="swiper-wrapper">
|
||||
<?php foreach ($banners as $index => $slide) :
|
||||
$device_vis = $slide['device_visibility'] ?? 'all';
|
||||
|
||||
Reference in new issue
Block a user