fix(widgets): render article sidebar by viewport CSS
This commit is contained in:
@@ -106,8 +106,10 @@ if (!function_exists('aksrt_single_build_context')) :
|
||||
$has_article_widgets = is_active_sidebar('all_sidebar_top')
|
||||
|| is_active_sidebar('sidebar-article')
|
||||
|| is_active_sidebar('all_sidebar_bottom');
|
||||
$show_aside = !wp_is_mobile()
|
||||
&& get_post_type($post_id) === 'post'
|
||||
// Do not use wp_is_mobile() as a layout gate. It is User-Agent based and
|
||||
// can disagree with the actual viewport (for example, desktop-mode mobile
|
||||
// browsers). The responsive stylesheet owns narrow-screen hiding.
|
||||
$show_aside = get_post_type($post_id) === 'post'
|
||||
&& $layout !== 'no_sidebar'
|
||||
&& $has_article_widgets;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user