Files
wordpress-theme-aksrt/sidebar.php
T
kate522 bd7d3046a5 feat(widgets): simplify locations and paid sidebar
Remove deprecated widget locations and widgets, standardize sidebar labels, and render a compact paid-post purchase card in the article sidebar.
2026-08-14 01:49:50 +08:00

38 lines
1.0 KiB
PHP

<?php
/**
* Sidebar template for generic pages.
*
* Single/home own their asides. This template only serves archive/page contexts.
* Callers only include this when aksrt_is_show_sidebar() is true.
* Keep the column even if widgets are empty (zibll parity).
*
* @package AKSRT
*/
defined('ABSPATH') || exit;
if (wp_is_mobile()) {
return;
}
$sidebar_id = function_exists('aksrt_resolve_sidebar_id')
? aksrt_resolve_sidebar_id()
: 'home_sidebar';
?>
<div class="sidebar" role="complementary" aria-label="<?php esc_attr_e('侧栏', 'aksrt'); ?>">
<?php if (is_active_sidebar('all_sidebar_top')) : ?>
<?php dynamic_sidebar('all_sidebar_top'); ?>
<?php endif; ?>
<?php if (is_active_sidebar($sidebar_id)) : ?>
<?php dynamic_sidebar($sidebar_id); ?>
<?php elseif ((is_home() || is_front_page()) && is_active_sidebar('home_sidebar')) : ?>
<?php dynamic_sidebar('home_sidebar'); ?>
<?php endif; ?>
<?php if (is_active_sidebar('all_sidebar_bottom')) : ?>
<?php dynamic_sidebar('all_sidebar_bottom'); ?>
<?php endif; ?>
</div>